Re: question abput While (list

From: Date: Sun, 22 Oct 2000 18:49:19 +0000
Subject: Re: question abput While (list
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-21656@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 ( ... )? ok, sorry about that. In english, it means: "while I am able to assign a value that is not null from each() to list(), do the follwing:" >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 >> >> -- Morten Dreier http://www.pobox.com/~mdreier/

« previous php.general (#21656) next »