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 

2 thought on “How to make a random number in PHP”

Leave a Reply