note 37170 deleted from control-structures.alternative-syntax by betz

From: Date: Thu, 31 Mar 2005 12:00:11 +0000
Subject: note 37170 deleted from control-structures.alternative-syntax by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-87262@lists.php.net to get a copy of this message
Note Submitter: StarLight pl.net.solutions@slt ---- In response to justin at iqmail dot net note, the parse error is because of lazy coding and has nothing to do with mixing syntax ;-). You should put a semicolon at the end of the second multi-line if. This works and didn't bark (tested on php 4.0.3pl1):D <?php if (condition): // code if (another_condition) { // multi-line code }; //notice the semicolon else: ?> [html here] <?php endif; ?> best regards, StarLight

« previous php.notes (#87262) next »