Is there a way to find a random number between two numbers? Like say I've got a database and It has $xyz amount of quotes or something and I need to find a random number between $xyz and 52 or 27 and 64. How do I do that?
Thanks!
Something like [man]rand[/man]($xyz, 64) would work for that.
Hi
What's a manual?
rand (PHP 3, PHP 4 >= 4.0b1) Generate a random value int rand () int rand (int min, int max) If called without the optional min, max arguments rand() returns a pseudo-random value between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use rand (5, 15). Remember to seed the random number generator before use with srand(). Note: In versions before 3.0.7 the meaning of max was range. To get the same results in these versions the short example should be rand (5, 11) to get a random number between 5 and 15.
Trevor
I am not sure if I understand the question fully, but a manual is a "how to guide" of sorts. The PHP manual is where you can look up how to install, run, and write php.
Thanks, I'll check the manual next time. I guess I just didn't think about it. Although, It's hasn't been loading on my computer.