note 32095 modified in control-structures.alternative-syntax by vrana

From: Date: Thu, 05 Aug 2004 18:11:28 +0000
Subject: note 32095 modified in control-structures.alternative-syntax by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74040@lists.php.net to get a copy of this message
A comment to the above: You shouldn't need to change your code syntax because of nested flow control statements. Instead you should strongly think about your coding style and getting a better text editor. For example, indent your structures and sub structures: <?php if($foo){ if($Bar){ // some code } else{ // something else } } else{ for($i=0;$i<$foo;$i++){ // do something } } ?> Also, any text editor worth using for coding (emacs, vi(m), BBEdit, Elvis, etc..) should do bracket balancing in case you are really in deep. --was-- A comment to the above: You shouldn't need to change your code syntax because of nested flow control statements. Instead you should strongly think about your coding style and getting a better text editor. For example, indent your structures and sub structures: if($foo){ if($Bar){ <some code> } else{ <something else> } } else{ for($i=0;$i<$foo;$i++){ <do something> } } Also, any text editor worth using for coding (emacs, vi(m), BBEdit, Elvis, etc..) should do bracket balancing in case you are really in deep. http://php.net/manual/en/control-structures.alternative-syntax.php

« previous php.notes (#74040) next »