gavin.sibley Posted March 15, 2012 Share Posted March 15, 2012 Hello, i have the following statement in my code if($slide[active] == "0"){ echo("<div style='background: url(/img/new.png) no-repeat; padding-left: 23px; font-weight: bold;'>$slide[title]. $slide[fname] $slide[lname]</div>"); }else{ echo("$slide[title]. $slide[fname] $slide[lname]"); } ?><?php this makes any database entry thats has field 'active' set to '0' appear in bold and with a 'NEW!' image appear to the side of it. How could i alter this so that it would also make these changes (bold and 'new' image) to any entry that also had field named 'payeddeposit' set to 'no'? many thanks, gavin Quote Link to comment https://forums.phpfreaks.com/topic/258983-add-or-into-if-stament/ Share on other sites More sharing options...
AyKay47 Posted March 15, 2012 Share Posted March 15, 2012 if($slide['active'] == 0 || $slide['payeddeposit'] == 'no') { //do something in TRUE block } else { //do other stuff in FALSE block } Quote Link to comment https://forums.phpfreaks.com/topic/258983-add-or-into-if-stament/#findComment-1327616 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.