Posted by & filed under Programming.

Real quick little function to get a random number using PHP.

$x = rand(1,100);

The variable $x will contain a random number between 1 and 100.

It’s rand(min, max) if you don’t want to use 1 and 100 as your limits.

Leave a Reply

Your email address will not be published. Required fields are marked *