note 84208 deleted from function.exit by felipe

From: Date: Thu, 03 Jul 2008 10:58:28 +0000
Subject: note 84208 deleted from function.exit by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141110@lists.php.net to get a copy of this message
Note Submitter: Lee ---- Regarding error handling, it's possible to exit from the PHP at any point and still output the remaining HTML quite cleanly as follows... <HTML><BODY><PRE> <?php function main_php() { // ... if ( error ) { echo "Something went wrong." return 0; } // ... rest of your code... // ... return 0; } main_php() ?> </PRE></BODY></HTML> <!-- Still output even if an error occurs -->

« previous php.notes (#141110) next »