note 96469 rejected from control-structures.elseif by danbrown

From: Date: Mon, 01 Mar 2010 16:00:14 +0000
Subject: note 96469 rejected from control-structures.elseif by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-166493@lists.php.net to get a copy of this message
Note Submitter: ilearned_itglobal@ymaildotcom ---- I recently ran into a block of code that had a else if statement in an unusual way. I was looking at the code and notice that the if statement was nested inside a else statement later in the code without the else being closed off. I haven't parse this code to see if it was correct. I just need to know if anybody else ran into the same problem and what's the best way to parse it correctly. The code itself has a lot of security measures for a user Here is the example: function user(){ if ($a){ do something if ($b){ do something if ($c){ do something } else { do something else if ($e){ //nested inside a else statement do something } else { do something else } } } else { do something else } } else { do something else } } I'm not a pro (yet) but is there something wrong with this or is there a better way to parse this

« previous php.notes (#166493) next »