[Solved] DO customize PHP Array?


Two changes:

foreach($original as $value) {
    if(substr($value,0,2) == "03") {
        // CHANGE 1
        $save = $value;
        ++$r;//inc parent
        $j = 0; // child 
        $move_level[$r][$j] =$value;
    } else {
        if (($j % 4) > 0) $value .= $value;
        // CHANGE 2
        else if ($j && $j % 4 == 0) $value = $save.$value;
        $move_level[$r][floor($j / 4)] .= $value;
        ++$j;//inc child
    }
}

See it

2

solved DO customize PHP Array?