note 53016 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Tue, 29 Jan 2008 11:25:06 +0000 |
| Subject: | note 53016 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-135527@lists.php.net to get a copy of this message | ||
Note Submitter: fred at flintstone dot com
----
<?
You can easily use FOREACH to show all POST and GET variables from a form submission
function showpost_and_get()
{
print "<hr><h2>POST</h2><br>";
foreach($_POST as $varName => $value)
{
$dv=$value;
$dv=$value;
print "Variable: $varName Value: $dv<br>";
};
print "<hr><h2>GET</h2><br>";
foreach($_GET as $varName => $value)
{
$dv=$value;
print "Variable: $varName Value: $dv<br>";
};
}