On Monday 22 October 2001 14:28, David Otton wrote: > why does this work: > > foreach ($table as $row) > list ($a, $b) = $row; > > but this doesn't? > > foreach ($table as list ($a, $b));
because the correct syntax is foreach ($table as $key => $val) { ... } RTFM :) BTW: overwriting $a, $b in each iteration isn't particularly useful... -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Those who will not reason, are bigots, those who cannot, are fools, and those who dare not, are slaves. - George Gordon Noel Byron (1788-1824), [Lord Byron] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]