1.

How to gernate random value in PHP

Answer»

Below CODE will helps you to get a random NUMBER from 1 to 500. This can alos helps in doing lottery system as WELL as in same game programming.


< ?PHP
$RandNumb = range(1,500);
$NumberVal = array_rand($RandNumb);
ECHO "The number is: $NumberVal n n";
?>



Discussion

No Comment Found