PHP function of the day: rand()

For day 13 of 21 in the “PHP Function of the day” series, I’m going to look at rand(). This function generates a random integer.  You can feed it a minimum value and a maximum value or let it generate a value without the limits.

Let’s take a look.


echo(rand().'<br />’);

echo(rand().'<br />’);




See the output


I have 7 more posts left in this series.  I’m glad that I’m getting through this goal of doing a month of daily posts in the first half of the year.  After this, weekly posts are going to feel easy. 😉

Leave a Reply

Your email address will not be published.