RE: [PHP] Re: strange error

From: Date: Thu, 23 Aug 2001 17:09:14 +0000
Subject: RE: [PHP] Re: strange error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64138@lists.php.net to get a copy of this message
>if you have structure like ><html> ><?php >if (isset(...)){ >...; >} [...] >?> ></html> >you have to insert "endif;" >If you think you did it but still have an error, try to count your "if" >statements and "endif;" maybe something is missing. This is a matter of personal preference, but use formatting that is helpful to determine where you are in your code... and comment yourself... it will avoid missing } { and other common erors that eat up valuable time tracking down. HTML cares less about the extra spaces and \n's anyway <?PHP while(something){ if(something){ doing something }else{ doing something else } #endif } #endwhile ?> While generally restrictive in nature, some good ideas for policing your own code can be found at http://utvikler.start.no/code/php_coding_standard.html (just one copy I came across). take what you need out of there... once you stick to a method, your occasions of tracking down loose ends will drop greatly. Dave

« previous php.general (#64138) next »