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
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
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
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
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..
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))
>{
>
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
7 matches
Mail list logo