Bad code.
Take the ';' off the end of the foreach...
ROBERT MCPEAK wrote:
>Why is this code:
>
>
> $bob=array(1,2,3,5,6);
>
> foreach($bob as $foo);
> {
> echo "$foo";
>
Don't put a semicolon after the foreach.
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2002-08-27 at 11:07, ROBERT MCPEAK wrote:
> Why is this code:
>
>
> $bob=array(1,2,3,5,6);
>
> foreach($bob as $foo);
>
> From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 27, 2002 11:08 AM
> Subject: [PHP] flaking out on foreach
>
>
> Why is this code:
>
>
> $bob=array(1,2,3,5,6);
>
> foreach($bob as $foo);
3 matches
Mail list logo