RE: [PHP] Newbie problem with POST vars
| From: | Ford, Mike [LSS] | Date: | Thu, 13 Jun 2002 15:11:38 +0000 |
| Subject: | RE: [PHP] Newbie problem with POST vars | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101974@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Remy Dufour [mailto:rdufour@propage.com]
> Sent: 13 June 2002 14:34
>
> If you do this, it should work
>
> function foo()
> {
> global $_POST;
That's unnecessary -- the $_ arrays are automatically global ("superglobal").
> reset($_POST);
That's unnecessary -- foreach always traverses the whole of an array, regardless of the current
position of its internal pointer.
> foreach($_POST as $item => $value){
> echo "$item, $value<br>";
> }
> }
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211