Sr. PHP Programmer Question: Download Senior PHP Programmer PDF

How will you generate random numbers using PHP?

Tweet Share WhatsApp

Answer:

The PHP rand() function is used to generate a random number. This function can generate numbers with-in a given range. The random number generator should be seeded to prevent a regular pattern of numbers being generated. This is achieved using the srand() function that specifies the seed number as its argument.

Download Senior PHP Programmer PDF Read All 202 Senior PHP Programmer Questions
Previous QuestionNext Question
How will you get information sent via post method in PHP?How will you check if a file exists or not using php?