Re: Exit Function
| From: | Josh G | Date: | Wed, 31 Jan 2001 22:37:05 +0000 |
| Subject: | Re: Exit Function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37553@lists.php.net to get a copy of this message | ||
by the way,
if ($foo = $bar)
will return true simply if $bar is not null, i think you want
if ($foo == $bar)
thought I'd point that out, cause if you don't know return that nasty
one would probably bite you on the ass next :)
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
----- Original Message -----
From: "Steve Smith" <steve@sws-ic.com>
To: "Karl J. Stubsjoen" <karlflips@kstub.com>
Cc: "PHP Mailing List" <php-general@lists.php.net>
Sent: Thursday, February 01, 2001 9:39 AM
Subject: Re: [PHP] Exit Function
> 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
>