Re: looping through values from a field? Need hellp.

From: Date: Sun, 06 Jul 2003 00:21:59 +0000
Subject: Re: looping through values from a field? Need hellp.
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-154098@lists.php.net to get a copy of this message
That was the trick. Just the space was messing things up. Thanks. ----- Original Message ----- From: "Lars Torben Wilson" <torben@php.net> To: "Micah Montoya" <montmica@isu.edu> Cc: <php-general@lists.php.net> Sent: Saturday, July 05, 2003 6:18 PM Subject: Re: [PHP] looping through values from a field? Need hellp. > On Sat, 2003-07-05 at 17:13, Micah Montoya wrote: > > Ok. I gave it a shot but have run into one other question that I wasn't > > able to find that was addressed by the article. > > > > My select statement looks like this: > > > > <select name="imgList[]" style="width:350;" size="6" > > multiple></select> > > > > When I create the php file, I am trying something like below but it isn't > > working and I am receiving an error. What am I not doing? > > > > $filename = $_POST["imgList"]; > > > > for each ($filename as $value) { > > echo $value; > > } > > > > thanks > > Impossible to say without know what the error says. :) Anyway, if that > code is cut-and-pasted, then 'foreach' should have no space in it. That > would cause a parse error. Otherwise, you could be getting a Notice > if you're actually passing something in via method="GET" but checking > the $_POST array instead. > > > > -- > Torben Wilson <torben@php.net> +1.604.709.0506 > http://www.thebuttlesschaps.com > http://www.inflatableeye.com > http://www.hybrid17.com Ji¬^ÕaÏäŠ > i­Ñ·http://www.themainonmain.com > -----==== Boycott Starbucks! http://www.haidabuckscafe.com > ====----- > > > >

« previous php.general (#154098) next »