Generate random numbers: in PHP

Description

The following code shows how to generate random numbers:.

Example


  // ww w. j a  v a  2s . c  o m
<?php
    echo(mt_rand() . "<br>");
    echo(mt_rand() . "<br>");
    echo(mt_rand(10,100));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions