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)
> >
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
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) {
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
4 matches
Mail list logo