You are here: Re: [PHP] Nested IFs Problem « PHP « IT news, forums, messages
Re: [PHP] Nested IFs Problem

Posted by Jordan Miller on 10/09/33 11:25

why not rewrite it to be more concise... i can't see a problem at the
moment. are you sure you can do a "<" comparison operator on the
'12:00' and '2005-10-02' string?? Maybe if you are using 24 hr format
you could just get rid of the ":" on both sides of the operator to
have the "<" properly evaluated... do the same for the date comparison.

just try each if statement individually. then, when you find the
problem, rewrite like this:

if ((putFirstExpressionHere) && (putSecondExpressionHere) &&
(putThirdExpressionHere)) {
// success
} else {
// failure
}

Jordan



On Aug 31, 2005, at 3:05 PM, Albert Padley wrote:

> if ($row['date'] < '2005-10-02') {
> if ($row['time'] < '12:00') {
> if ($row['field'] == 'P5' ) {
>
> echo "<td class=\"tabletextbluebg\">Success";
>
> }
> }
> }
>
> else {
>
> echo "<td class=\"tabletextred\">Failed";
> }
>

 

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

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