RE: [PHP] Shorter way for "each"

2001-01-10 Thread Moritz Petersen
Hey Wico, > echo implode (' ', $array); this is quite a cool idea! For example echo "" . implode("", $my_array) . ""; would save some time, printing out an select-group... Thanks a lot, also to all other people, who helped me. Mo. -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Shorter way for "each"

2001-01-10 Thread Wico de Leeuw
hiya echo implode (' ', $array); greetz, Wico At 08:24 10-1-01 -0800, Chris Lee wrote: >everyone allready posted about foreach(), but they didnt post the >alternative syntax > >foreach ($array as $position => $value) >{ > echo $postition : $value\n"; >} > >http://www.php.net/manual/control

Re: [PHP] Shorter way for "each"

2001-01-10 Thread Chris Lee
everyone allready posted about foreach(), but they didnt post the alternative syntax foreach ($array as $position => $value) { echo $postition : $value\n"; } http://www.php.net/manual/control-structures.foreach.php Chris Lee Mediawaveonline.com ""Moritz Petersen"" <[EMAIL PROTECTED]> wr

RE: [PHP] Shorter way for "each"

2001-01-10 Thread Moritz Petersen
That's it. Thank you! > -Original Message- > From: Alexander Wagner [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 10, 2001 4:17 PM > To: Php-General@Lists. Php. Net > Subject: Re: [PHP] Shorter way for "each" > > > Moritz Petersen

Re: [PHP] Shorter way for "each"

2001-01-10 Thread Alexander Wagner
Moritz Petersen wrote: > is there a shorter way to do: > > while (list($key, $value) = each($my_array)) > { > echo $value... > } > > I just need the value! PHP3: while (list(, $value) = each($my_array)) { echo $value... } PHP4: foreach ($my_array as $value) { echo $value..

Re: [PHP] Shorter way for "each"

2001-01-10 Thread Cynic
while( list( , $value ) = each( $my_array) ) or foreach( $my_array as $value ) At 16:16 10.1. 2001, Moritz Petersen wrote the following: -- >Hi, > >is there a shorter way to do: > >while (list($key, $value) = each($my_array)) >{ >

[PHP] Shorter way for "each"

2001-01-10 Thread Moritz Petersen
Hi, is there a shorter way to do: while (list($key, $value) = each($my_array)) { echo $value... } I just need the value! Thanks, Mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To conta