fork(1) download
  1. <?php
  2. $a = array(array(array("Brasil","Franca","Italia","China")));
  3. print_r($a);
  4. $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($a));
  5. $novo = array();
  6. foreach($it as $v) {
  7. $novo[] = $v;
  8. }
  9. print_r($novo);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => Brasil
                    [1] => Franca
                    [2] => Italia
                    [3] => China
                )

        )

)
Array
(
    [0] => Brasil
    [1] => Franca
    [2] => Italia
    [3] => China
)