Good day,

As the documentation says, exit() will end your script.

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:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 8:25 AM
Subject: [PHP] Exit();


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 ?

Function One()
    If (!$var) { Exit(); }

Function Two();
    One();    //This line kills the program
    Print("Hello"); //This is not printed =(


Mauricio Cuenca

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to