fork download
  1. <?php
  2.  
  3. $array = array (
  4. 0 => array (
  5. 0 => 'valor1',
  6. 2 => 'valor2',
  7. ),
  8. 1 => array (
  9. 0 => 'valor3',
  10. 1 => 'valor4',
  11. 3 => 'valor5'
  12. )
  13. );
  14.  
  15.  
  16. for($i=0; $i<count($array); $i++){
  17. $array[$i] = array_values($array[$i]);
  18. }
  19.  
  20. print_r($array);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => valor1
            [1] => valor2
        )

    [1] => Array
        (
            [0] => valor3
            [1] => valor4
            [2] => valor5
        )

)