<?php $test = array( 'abc' => 123, 'def' => 456, 'test' => array( 123 => 'hip', 'hop' => array( 'tip' => 'top', 'top' => null ) ) ); while (list($old, $arr) = each($test)) { if (is_array($arr)) { unset($test[$old]); foreach ($arr as $new => $v) { $test["$old.$new"] = $v; } } } var_dump($test);
You have javascript disabled. You will not be able to edit any code.