Re: foreach question

From: Date: Wed, 11 Apr 2007 00:07:59 +0000
Subject: Re: foreach question
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-252510@lists.php.net to get a copy of this message
On Sun, April 8, 2007 6:29 pm, chris@aquanuke.com wrote: > I have .. > > foreach( $_POST as $key ) { > echo "$key<br />"; > } You are actually echoing out the VALUE, not the KEY... > and that gives me > > item1 > item2 > item3 > item4 > item5<br /> Unless your VALUE has "item1\nitem2\nitem3\nitem4\nitem5" in it, I don't how this could happen... Use "view source" in your browser. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#252510) next »