Can i do this? what would be the correct syntax?
If somthing
{
} else
{
exit do not execute anything more
}
Thankjs
Printable View
Can i do this? what would be the correct syntax?
If somthing
{
} else
{
exit do not execute anything more
}
Thankjs
I'm not shure what you are asking, stop part of the code from executing or stopping the file from being processed at all?
Cheers,
Ryan Jones
sorry say we have this.....
If this is true {
do this
}else{
stop execution of all the file below
}
more commands, on executed if above was true.
basicly and exit sub kind of thing
Thanks
Ah, I understand now :)
Something like this?
Cheers,Code:if ($Something)
{
echo 'Looks like you can continue then!';
}
else
{
echo 'Sorry you can go no further!';
exit(0);
}
# Anything down here will only execute if the above IF statement was true.
Ryan Jones
i knew it would be somthing simple. Thanks
PHP makes many things simple, when you know what the things are :)Quote:
Originally Posted by Pino
There is another called die(); that allows you to do the same thing.
Cheers,
Ryan Jones