How to make a random number in PHP

To make a random number in PHP you can use the following snippet.

Sample PHP

$randInt = rand(9); // make a random number between 0 and 9 

Please Share us:
Please rate this snippet

2 thoughts on “How to make a random number in PHP

Leave a Reply