Val Val - 1 year ago 112
PHP Question

PHP random number using min - max

Is there a way to generate a random number based on a min and max?

For example, if min was 1 and max 20 it should generate any number between 1 and 20, including 1 and 20?

Answer Source
  echo rand($min,$max);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download