All pastes #424663 Raw Edit

Someone

public text v1 · immutable
·published 2007-04-04 22:56 UTC
rendered paste body
$a[] = array('id' => '10', 'description' => 'uno', 'children' => '');
$a[] = array('id' => '20', 'description' => 'due', 'children' => '');
$a[0]['children'][] = array('id' => '30', 'description' => 'tre', 'children' => '');

Array
(
    [0] => Array
        (
            [id] => 10
            [description] => uno
            [children] => Array
                (
                    [0] => Array
                        (
                            [id] => 30
                            [description] => tre
                            [children] => 
                        )

                )

        )

    [1] => Array
        (
            [id] => 20
            [description] => due
            [children] => 
        )

)