Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/03/2011, 12:20
mogurbon
 
Fecha de Ingreso: enero-2011
Ubicación: DF
Mensajes: 898
Antigüedad: 13 años, 9 meses
Puntos: 155
Respuesta: Array multidimensional

Cita:
Iniciado por Marrselo Ver Mensaje
UHMM pues nop, amigo gracias por responder, pero eson no crear una coleccion de arrays :( si no un solo array

seguro??

Código PHP:
<?
$valor
=0;
$N=10;
for (
$z=1$z<=$N;$z++ ){
    
$valor++; // es una operacion cualquiera que me arroja valores diferentes segun avance el bucle
    
$array[]=$z;
    
$array[]=$valor;
    
$ARREGLO[]=$array;
    
}



print_r($ARREGLO);

?>
este codigo me da esto :


Array ( [0] => Array ( [0] => 1 [1] => 1 ) [1] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 ) [2] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 ) [3] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 ) [4] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 ) [5] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 [10] => 6 [11] => 6 ) [6] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 [10] => 6 [11] => 6 [12] => 7 [13] => 7 ) [7] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 [10] => 6 [11] => 6 [12] => 7 [13] => 7 [14] => 8 [15] => 8 ) [8] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 [10] => 6 [11] => 6 [12] => 7 [13] => 7 [14] => 8 [15] => 8 [16] => 9 [17] => 9 ) [9] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 [10] => 6 [11] => 6 [12] => 7 [13] => 7 [14] => 8 [15] => 8 [16] => 9 [17] => 9 [18] => 10 [19] => 10 ) )


un arreglo de arreglos