rand

(PHP 3, PHP 4, PHP 5)

rand -- genera un valor aleatorio

Descripción

int rand ( [int min [, int max]] )

Si es llamada sin los argumentos opcionales min y max, rand() devuelve un valor pseudo-aleatorio entre 0 y RAND_MAX. Si quiere un número aleatorio entre 5 y 15 (inclusive), por ejemplo, use rand(5,15).

Recuerde introducir la semilla del generador de números aleatorios antes de usar srand().

Vea también srand(), getrandmax(), mt_rand(), mt_srand() y mt_getrandmax().

Hosting by: hurra.com
Generated: 2007-01-26 18:01:05