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

Posted by Albert Padley on 10/09/48 11:25

I have the following nested ifs:

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";
}
</td>

Whenever the 3 if statements are true, I always get the correct
"Success" to echo. However, if any or all of the if statements are
false, I never get "Failed" to echo.

I know it's something simple, but I just can't see it at the moment.

TIA

Albert Padley

 

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

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