note 15849 deleted from control-structures.else by irc-html

From: Date: Sat, 19 Jan 2002 19:19:33 +0000
Subject: note 15849 deleted from control-structures.else by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25234@lists.php.net to get a copy of this message
I saw this note a few days ago and nobody answered to the question at the end. I am sure that many of you know the right answer but, just to be sure that everyone will get the right one i'll answer the question. So the message was: yohgaki@hotmail.com 14-Apr-2001 02:04 Common mistake with "else" is "dangling elseh statement. Consider following code, if (<expr>) if (<expr>) /* a line of code */ else /* a line of code */ Is the gelseh belong to first gifh or second gifh statement? It is more clear if you write the code like this,it's more suggestive. if (expr) if (expr) /* a line of code */ else /* a line of code */ So else belog to the second if.

« previous php.notes (#25234) next »