Re: Exit Function
| From: | Steve Smith | Date: | Wed, 31 Jan 2001 22:39:35 +0000 |
| Subject: | Re: Exit Function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37551@lists.php.net to get a copy of this message | ||
On Wed, 31 Jan 2001, Karl J. Stubsjoen wrote:
> What is the way to exit a function? For example:
>
> function FooBar() {
>
> if ($foo = $bar)
> Exit_this_Function;
>
> ## otherwise execute the rest of this function
> }
Use "return". If you want your function to return a value, you
can use the syntax: return value;
Hope this helps,
--Steve
Hi! I'm a .signature virus! Copy me into yours and join the fun!