hello all! :)
Well this is my code:
for ($i=0; $i<5; $i++)
{
$random= array_rand($ids);
echo "<br> $random generated"; if ($check[$random]<>0)
{
$i--;
echo " number generated again";
}
else
{
$check[$random]=1; // set check to 1 to know the array number has been used
}
}
$rnd_num[]= $ids[$random];
echo "<br> $ids[$random]"; // storing the unique ids in array
I am not being able to store the unique numbers in the array $rnd_num
Can anyone help me plz?