Populating a Hash from $_POST
Moderator: General Moderators
Populating a Hash from $_POST
I'm a php newbie, how do I fill a hash with the field names and values of the $_POST global?
Not sure what you mean by populating a hash, but to access the names and values of all variables parrsed through POST, one would use..
Code: Select all
foreach($_POST as $name => $value){
echo "\$_POST['$name'] equals $value<br />\r\n";
// $name, $value are available
}