You are here: Re: Class method returns both TRUE and FALSE at the exact same time!! « PHP Programming Language « IT news, forums, messages
Re: Class method returns both TRUE and FALSE at the exact same time!!

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация