Re: question abput While (list
| From: | Cybercandy | Date: | Sun, 22 Oct 2000 18:43:30 +0000 |
| Subject: | Re: question abput While (list | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21655@lists.php.net to get a copy of this message | ||
Thanks for that, but I understand it in the way you have use it, but
what about in the example I gave in the context of While ( ... )?
regards
Allan Goacher
Cybercandy Ltd
----- Original Message -----
From: "Morten Dreier" <mdreier@pobox.com>
To: "Cybercandy Ltd" <allan@cybercandy.co.uk>
Cc: <php-general@lists.php.net>
Sent: Sunday, October 22, 2000 7:39 PM
Subject: Re: [PHP] question abput While (list
> On Sun, 22 Oct 2000, Cybercandy Ltd wrote:
>
> > I've been busting my poor meager brain over this and can't understand
this
> > line of
> > code please can someone explain to me what it means!?
> >
> > while (list(,$line) = each($incoming)) {
>
> I use (list($key,$line)=each($dbresult)), and that basically means that
> you take each line of the array $dbresult( consisting of a key and
> data), and assigning it to $key and $line. It is simply a way of assigning
> two variables at a time.
> From the manual:
>
> list
> Like array(), this is not really a function, but a language
> construct. list() is used to assign a list of variables in one operation.
>
> --
> Morten Dreier
> Institutt for Datateknikk og Informasjonsvitenskap
> http://www.ifi.ntnu.no/~mdreier/
>
>
>
> --
> 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
>
>