Re: Newbie problem with POST vars

From: Date: Thu, 13 Jun 2002 13:32:07 +0000
Subject: Re: Newbie problem with POST vars
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-101951@lists.php.net to get a copy of this message
On Thursday 13 June 2002 21:16, Sear, Mick wrote: > I've tried this, but it's still doing the same thing. Is there something > special about this particular variable that I need to know? I've tried it > with $HTTP_POST_VARS as well, declaring $HTTP_POST_VARS as global in the > function first. > > Put reset($_POST) before foreach loop > > > I'm trying to loop through $_POST vars in a function, which I > > understand > to > > > be an autoglobal associative array. Here's the code I'm using: > > > > foreach($_POST as $item => $value){ > > echo "$item, $value<br>"; > > } > > > > However, I only get the first element of the array echoed, even > > though I > > > know there to be other elements (I can access them as > > $_POST[element]) What do you get if you do: print_r($_POST); -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I gave up Smoking, Drinking and Sex. It was the most *__________horrifying* 20 minutes of my life! */

« previous php.general (#101951) next »