RE: [PHP] Exit();

From: Date: Thu, 04 Apr 2002 15:23:32 +0000
Subject: RE: [PHP] Exit();
Groups: php.general 
Request: Send a blank email to php-general+get-91533@lists.php.net to get a copy of this message
Good day, As the documentation says, exit() will end your script. http://www.php.net/manual/en/function.exit.php Use return() to end a function. ============================ Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -----Original Message----- From: Mauricio Cuenca [mailto:fauro@mindless.com] Sent: Thursday, April 04, 2002 8:25 AM To: php-general@lists.php.net Subject: [PHP] Exit(); Hello, I'm using recursive functions and call a function from inside another one. The problem is that when I call the Exit(); function the whole program is aborted. How can I quit just the current function, not the whole program ? <example> Function One() { If (!$var) { Exit(); } } Function Two(); { One(); //This line kills the program Print("Hello"); //This is not printed =( } </example> TIA, ______________________ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#91533) next »