I would like to preserve the keys to the associative input array ($varnames) and replace the values with those of $_POST. This function replaces the both the keys and values and returns an index array with the $_POST values.
function replace_value($a, $b) {
$a = $b;
return $a;
};
$varnames = array_map(replace_value, $varnames, $_POST);
print_r($varnames);
Any suggestions?
Roddy