I am building a list of \"agent id\'s\" in my database with the following requirements:
Try this code:
= 2)
{
while(($random_agtno % 100) == $digits[0])
shuffle($digits);
}*/
$random_agtno *= 10;
$random_agtno += $digits[0];
array_splice($digits, 0, 1);
}
return $random_agtno;
}
for($i = 0; $i < 1000; $i++)
{
$NEWAGTNO = createRandomAGTNO();
echo "";
echo $NEWAGTNO;
echo "
";
}
?>
Good luck!
Edit: Removed the call to srand() and commented-out the "if($i >= 2)" code, which is impossible anyway, here.