Re: Nesting 'foreach ()'
| From: | Daniel Grace | Date: | Sat, 03 Mar 2001 17:42:12 +0000 |
| Subject: | Re: Nesting 'foreach ()' | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42458@lists.php.net to get a copy of this message | ||
"Tim Ward" <tim.ward@stivesdirect.com> wrote in message
news:C96B188CCAA0D311BCDF00500416D3C01A80FA@hunters-mail.itnetadmin.com...
>
> is okay (but still doesn't work) although I have noticed that you seem to
> need to code-block single statements in if ... else constructs
> i.e
> if (1==1) echo("fred") else echo("bill"):
> should work but doesn't.
>
if (1==1) echo("fred"); else echo("bill"):
----------------------^
You need to have a semicolon before the else.
- Daniel Grace <http://dewin.oldbattery.com/>
--
"Space may be the final frontier but its made in a Hollywood basement."
- Red Hot Chili Peppers - Californication