Cita:
Iniciado por Marrselo 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