Ver Mensaje Individual
  #11 (permalink)  
Antiguo 24/11/2011, 10:36
dksoft
 
Fecha de Ingreso: octubre-2010
Mensajes: 123
Antigüedad: 14 años, 4 meses
Puntos: 10
Respuesta: Mostrar numero aleatorios

Es muy facil generar un numero fraccionado (6).

$numero = rand(1,4).".".rand(0,9);

eso te devolvera un numero algo asi:

3.8 !! funciona y Bien o_O y para otra forma tambien seria.

function random($min,$max) {ç
$rand = rand($min,$max);
$tmp = rand(0,1);
if($tmp == 1) {
$tmp .= ".5";
}
}