Re: Shorter way for "each"

From: Date: Wed, 10 Jan 2001 15:24:47 +0000
Subject: Re: Shorter way for "each"
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33670@lists.php.net to get a copy of this message
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)) >{ > echo $value... >} > >I just need the value! > >Thanks, >Mo. > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------end of quote------ ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.general (#33670) next »