Page 1 of 1

How can I iterate over POST variables ?

Posted: Fri Sep 02, 2011 7:37 am
by aneuryzma
WHen I want to get a POST variable I use $_POST["VARIABLENAME"].

What if I don't want to specify the variable name, and let's say iterate over all variables in a loop ?

Re: How can I iterate over POST variables ?

Posted: Fri Sep 02, 2011 7:44 am
by Eric!

Code: Select all

foreach($_POST as $key=>$value){
echo $key." = ".$value;
}