Ver Mensaje Individual
  #15 (permalink)  
Antiguo 18/01/2009, 14:11
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: hacer random en un array

Cita:
mm mira lo que hace esto

Array ( [0] => 1 [1] => 3 [2] => 4 [3] => 5 [4] => 2 [5] => 6 )
Pues eso es lo que le he dicho al codigo que haga, que "baraje" el array y que luego lo imprima con print_r.

Código PHP:
<?php
$array 
= array(1,2,3,4,5,6);
shuffle($array);
print_r($array);
?>