- var_dump: documentation ( source)
<?php
$test = array(
'abc' => 123,
'def' => 456,
'test' => array(
123 => 'hip',
'hop' => array(
'tip' => 'top',
'top' => null
)
)
);
foreach ($test as $old => $arr) {
if (is_array($arr)) {
unset($test[$old]);
foreach ($arr as $new => $v) {
$test[$old.$new] = $v;
}
}
}
var_dump($test);