> Why? The "I'm here" line is outside the conditional. The function will
> still complete independent of the conditional. If $i is greater than ten,
> the pointer just skips the contents of the if/then and continues on the
> next line after it. Here's a better illustration:

In my test() function, I called test() again inside the if statement (which
checks true for 10 iterations), and I thought that the current function
would immediately be terminated by calling itself (or any other function
that doesn't return) again and never actually echo "I'm here" until the
condition wasn't met, therefore the function not called again.

No?

>
> function gooble($alGore) {
> echo "This is a ";
> if ($alGore!="President") {
> echo "longer ";
> }
> echo "sentence.<br />";
> }
> gooble("Vice President");
> gooble("Crazy Mountain Man);
> gooble("President");
>
> If you want the function to terminate when the conditional is false, then
> you need an Else statement to do so, otherwise it's going to keep going.
>
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Email: [EMAIL PROTECTED]
> Web: www.healthtvchannel.org
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to