Date: 04/29/98
- Next message: Bug Database: "[PHP-DEV] Bug #329 Updated: inconsistency with if-elseif-else-endif loops"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/serverapi"
- In reply to: info <email protected>: "[PHP-DEV] Bug #329: inconsistency with if-elseif-else-endif loops"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I think this is a bug - if it is supposed
> to be this way, I sure don't see the
> why?!?
>
> In PHP3 you're supposed to use ":"
> instead of ";" between the different
> statements in a if-elseif-else-endif
> loop.
not true.
> $a=1; if($a=1):
> fputs($fd, "line1\n"):
> fputs($fd, "line2\n");
> endif;
> pclose($fd)?>
>
> To make it work I had to use
> ";" instead of ":" in the first
> fputs line - like this:
You aren't supposed to use : after a statement. Only after if(): and else
if(): and else:. Statements in between need ;
Shane
- Next message: Bug Database: "[PHP-DEV] Bug #329 Updated: inconsistency with if-elseif-else-endif loops"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/serverapi"
- In reply to: info <email protected>: "[PHP-DEV] Bug #329: inconsistency with if-elseif-else-endif loops"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

