Sr. PHP Programmer Question: Download Senior PHP Programmer PDF
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.
Previous Question | Next Question |
How will you get information sent via post method in PHP? | How will you check if a file exists or not using php? |