Posted by comp.lang.php on 07/25/06 14:45
Alvaro G. Vicario wrote:
> *** comp.lang.php escribió/wrote (24 Jul 2006 14:49:55 -0700):
> > [PHP]
> > class ThumbView extends PaginationView {
>
> I can't really understand your question. But I'll provide a couple of
> hints:
>
> 1) The return statement causes the method to end its execution immediately.
> How can you have two return values *at the same time*?
>
> 2) You need to use brackets if you want more than one sentence within a
> control structure. So:
>
> if($foo)
> bar();
>
> works as expected.
>
> if($foo)
> bar();
> print_r('666');
>
> doesn't: print_r() is out of the if() block so it's always executed.
>
I know this, but thanx again for the general reminder.
I wound up rewriting the entire class with local conditional
self-instantiation and utilized that for further method execution and
it works! Returns "just once" this time.
Phil
>
>
> --
> -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
> ++ Mi sitio sobre programación web: http://bits.demogracia.com
> +- Mi web de humor con rayos UVA: http://www.demogracia.com
> --
Navigation:
[Reply to this message]
|