PHP : 2次元配列の値を、別の2次元配列に詰め替える

イテレーターの中で、空インデックス(添え字の指定なし)の方式で、新しい配列への代入処理を書けばOK。

<?php

$fruits = [
             ['name'=>'banana'], 
             ['name'=>'apple'], 
             ['name'=>'mango']
          ];

$new_frtuis = [];

foreach($fruits as $key => $value ){
    $new_frtuis[] = [$key, $value];
}

print_r($new_frtuis);

実行結果

Array
(
    [0] => Array
        (
            [0] => 0
            [1] => Array
                (
                    [name] => banana
                )

        )

    [1] => Array
        (
            [0] => 1
            [1] => Array
                (
                    [name] => apple
                )

        )

    [2] => Array
        (
            [0] => 2
            [1] => Array
                (
                    [name] => mango
                )

        )
/* https://sunrise033.com/entry/hatena-blog-how-to-hierarchicalize-categories */