| 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";
?>
| | |