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 Alvaro G. Vicario on 07/25/06 10:07

*** 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.



--
-+ 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

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