Sr. PHP Programmer Question:

How will you generate random numbers using PHP?

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.

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?