hi, I am trying to get 3 random images out of a pool of 15 images(let say shapes square, circle and , but the images must be - unique so no repeat - some shapes just once - some images more "random", so a higher change to appear for the non repeat i use function non_repeat($min, $max, $count, $sort = false) { /** * method outputs an unique array within a range * * $min begin range * $max end range * $count output **/ if ($max - $min < $count) { return false; } $arr = range($min, $max); $arr_rnd = array_rand($arr, $count); foreach ($arr_rnd as $each) { $nonrepeatarray[] = $arr[$each]; } if (!$sort) { shuffle($nonrepeatarray); } return $nonrepeatarray; } Code (markup): What should i do next??