Re: Foreach problem.

From: Date: Wed, 09 Feb 2005 23:11:17 +0000
Subject: Re: Foreach problem.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-208400@lists.php.net to get a copy of this message
Since you didn't post how you created the array, I went ahead and (ugh!) did it myself. This works fine. <?php $elementsarr = Array ('knr', 'subject', 'title', 'kat', 'pages', 'access', 'dofile', MAX_FILE_SIZE, 'pdf', 'dolink', 'link', 'erstam', 'endless', 'from', 'until', 'openbem', 'history', 'closedbem', 'b', 'br', 'bw', 'bay', 'h', 'hb', 'hh', 'mv', 'n', 'nw', 'rp', 's', 'sa', 'sh', 'sn', 't', 'bund' ); print_r($elementsarr); foreach ($elementsarr as $k => $v) { echo "$k => $v\n"; } ?> -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://www.php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#208400) next »