Ver Mensaje Individual
  #8 (permalink)  
Antiguo 04/07/2013, 03:23
Avatar de andy98
andy98
 
Fecha de Ingreso: diciembre-2011
Mensajes: 32
Antigüedad: 12 años, 4 meses
Puntos: 2
Respuesta: Problema con array_rand

$rand_keys = array_rand($a, 4);
asort($rand_keys);

for ($i = 0; $i < 4; $i++) {
if ($i < 3)
echo $rand_keys[$i]." - ";
else
echo $rand_keys[$i];
}

He hecho este cambio y aun así sigue devolviendo 0 y 0 no existe en el array.

Super-raro