Re: [PHP] language question

2001-10-23 Thread dempsejn
t; Date: Tuesday, October 23, 2001 4:14 pm Subject: Re: [PHP] language question > On Mon, 22 Oct 2001 16:47:56 +0200, you wrote: > > >On Monday 22 October 2001 14:28, David Otton wrote: > >> why does this work: > >> > >>foreach ($table as $row) > >

Re: [PHP] language question

2001-10-23 Thread David Otton
On Mon, 22 Oct 2001 16:47:56 +0200, you wrote: >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

Re: [PHP] language question

2001-10-22 Thread Christian Reiniger
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) {

[PHP] language question

2001-10-22 Thread David Otton
why does this work: foreach ($table as $row) list ($a, $b) = $row; but this doesn't? foreach ($table as list ($a, $b)); it seems to me that the two are equivalent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] Fo