function GetFormData($_POST) { $output = array(); foreach ($_POST AS $first => $A) { if (is_array($A)) { foreach ($A AS $second => $B) { if (is_array($B)) { foreach ($B AS $third => $C) { if (is_array($C)) { foreach ($C AS $fourth => $D) { echo $third.": ".$D."
"; $output[$third] = $D; } } else { echo $second.": ".$C."
"; $output[$second] = $C; } } } else { echo $first.": ".$B."
"; $output[$first] = $B; } } } else { echo $first.": ".$A."
"; $output[$first] = $A; } } return ($output); }