[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] Exit Function
From:       Steve Smith <steve () sws-ic ! com>
Date:       2001-01-31 22:39:35
[Download RAW message or body]

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!





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic