echo mt_rand(10,100); // Output is 32 
int mt_rand ( int $min, int $max)
$minOptional : Minimum range of random number to be generated.
$maxOptional : Maximum range of random number to be generated.

Output is a random value.

This function uses Mersenne Twister Random Number Generator.

Example 1

echo mt_rand();
Out put is ( will chage )

Math Functions getrandmax(): Getting highest random number max() function
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer