//this function generates the distinct random numbers for the 25 requirment
function unique_rand_numbers($numbers)
 for($i = 1; $i = 40; $i++)
	$numbers = $i;
 $array = array();
 //get unique random keys from $numbers array.
 $rand_keys = array_rand($numbers,25);
 //this sorts the distinct random numbers taken from $numbers in random order.

 //stuck on this part..i need to store more than one value here
//theres 25 intergers in $rand_numbers..i'd a ppricaite any help.

 $array[][] = $rand_numbers;
 return $rand_numbers;
Member Avatar
function unique_rand_numbers($min=1,$max=40,$inc=1,$num=25){
 $rand_keys = array_rand(range($min,$max,$inc),$num);
 return $rand_keys;

echo "<br /><br /><br />";

If you need a list of numbers in an array, range() can save some time. I've included optional parameters in the function, but you can take these out and hardcode your values if you want.