Re: learning php - problem already

From: Date: Tue, 29 Jul 2003 20:58:52 +0000
Subject: Re: learning php - problem already
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157432@lists.php.net to get a copy of this message
* Thus wrote karin@justinfo.info (karin@justinfo.info): > > Hello everyone, > Am new to php and have run into a problem while reading my book... can anybody tell me what > does this mean: > > foreach($invoice as $number => $pppno) this rather straight forward: foreach([array] as [key] => [val] ) > > and also this: > > while(list($k,$v,) = each($a)) This one is a little more involved but it really does the same thing as the foreach loop (above) but is backward compatible to php 3.0. > > I do understand for loops and while loops but this is a bit confusing...do you haev any links I > can read up on these? The php manual is an excellent resource for learning the information http://www.php.net/ And a little trick for those who don't like clicking around alot and know the function name your looking for: If you type 'php.net/foreach' in your browser, the php site will direct you to the proper page. If you typed it wrong or no statement/function is found it sends you to a google search with that term, yeilding excelent results (usually is a lucky match that you wanted). Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#157432) next »