Junior PHP Developer Question:
Do you know what is the use of rand() in php?

Answer:
It is used to generate random numbers. If called without the arguments it returns a pseudo-random integer between 0 and getrandmax(). If you want a random number between 6 and 12 (inclusive), for example, use rand(6, 12). This function does not generate cryptographically safe values, and should not be used for cryptographic uses. If you want a cryptographically secure value, consider using openssl_random_pseudo_bytes() instead.
Previous Question | Next Question |
Tell me what is the use of mysql_real_escape_string() function? | Tell us how to create an array of a group of items inside an HTML form? |