i think this will do it
function recursive($array, $level = 0) {
foreach($array as $key => $value) {
if (is_array($value)) {
echo str_repeat(" ", $level), "[".$value['tag']."]<br>", '';
if (@$value['children']) {
recursive($value['children'], $level + 1);
}
echo str_repeat(" ", $level), "[/".$value['tag']."]<br>", '';
}
}
}
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.