RE: [PHP] re: array question

From: Date: Wed, 19 Sep 2001 03:04:01 +0000
Subject: RE: [PHP] re: array question
Groups: php.general 
Request: Send a blank email to php-general+get-67783@lists.php.net to get a copy of this message
If you want to store all the values in the array in one variable (just as a string with delimiters maybe?) Try this: foreach ($array as $value) { $temp .= $value . "|"; } Josh Hoover KnowledgeStorm, Inc. jhoover@knowledgestorm.com Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here > >foreach ($array as $value) { > > print $value; > >} > > > >if you wanted the key names, as well as the value, you could > use this: > > > >foreach ($array as $key => $value) { > > print "$key of \$array = $value"; > >}

« previous php.general (#67783) next »