Click to See Complete Forum and Search --> : [RESOLVED]How to stop code execution in PHP?
rasana
Oct 23rd, 2007, 02:02 AM
Hi all,
like in ASP we use
response.End()
to stop code execution in between..
is there any function in php to stop code execution in between?
penagate
Oct 23rd, 2007, 02:28 AM
You can use exit() or die() to terminate the script if you must, but it's preferable to structure your code so that you don't have to.
rasana
Oct 23rd, 2007, 02:46 AM
Thanks penagate!!
sometimes what happnes we require to check whether data is
coming properly or not..so to just echo variables and stop further execution we require exit() or die()
i.e. to check mysql query whether given where claus contains data or not.
penagate
Oct 23rd, 2007, 03:28 AM
Oh, of course, if it's for debugging then that's fine.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.