higijj
asked on
Goto/label
Is there such a function like goto in PHP
I mean.. instead of calling exit() at many place in my code.. I'd like to send all 'exit()' to a single place where I could do the appropriate action (closing the DB)
I mean.. instead of calling exit() at many place in my code.. I'd like to send all 'exit()' to a single place where I could do the appropriate action (closing the DB)
ASKER
ok.. but what if I don't want my script to die?
then try another question :-)
You asked in your original question 'I'd like to send all 'exit()' to a single place where I could do the appropriate action (closing the DB)' and that is what I told you.
If you want to continue the script you have to use if, while or switch
Marian
You asked in your original question 'I'd like to send all 'exit()' to a single place where I could do the appropriate action (closing the DB)' and that is what I told you.
If you want to continue the script you have to use if, while or switch
Marian
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.php.net/manual/en/function.die.php
See Example 2 for using die with a function as parameter
Marian