The last function you will learn about in this chapter is rand(), a random-number generator:
The rand() function can also take minimum and maximum parameters, if you prefer to limit the generated number to a specific range:
These values are inclusive, so in this case 0 and 10 are feasible returned values.
In this exercise you will create a simple Lucky Numbers script utilizing random number generation.
Script 4-6: The rand() function generates random numbers.
Links
[1] https://www.studyanywhere.ca/advanced-courses/intro-php/chapter-4/using-numbers/exercise-6
[2] https://www.studyanywhere.ca/advanced-courses/intro-php/chapter-4/using-numbers/exercise-6#open_here
[3] https://www.studyanywhere.ca/advanced-courses/intro-php/chapter-4/using-numbers/exercise-6#open_here2
[4] https://www.studyanywhere.ca/advanced-courses/intro-php/chapter-4/using-numbers