danweav Posted June 15, 2010 Share Posted June 15, 2010 Newbie Alert!... I want to be able to write a bit of php that says something along the lines of 'if a = b or c show this...' This is the code I've written so far... <?php $val = $row_RS_UserDetails['User_AccountType']; if ($val == 'premium'); { ?><div style="background-color:#CCCCCC; border-color:#999999; border:solid; border-width:1px; width:300px; padding:10px; margin:5px"> Navigation for Premium Users: </div><?php } ?> How would I write it so it says 'if $val = premium or $val = premium2 show this...' Thanks in advanced! Link to comment https://forums.phpfreaks.com/topic/204868-simple-php-if-question/ Share on other sites More sharing options...
TOA Posted June 15, 2010 Share Posted June 15, 2010 if ($val == 'premium' || $val == 'premium2') { do this } else { otherwise do this } Link to comment https://forums.phpfreaks.com/topic/204868-simple-php-if-question/#findComment-1072475 Share on other sites More sharing options...
danweav Posted June 15, 2010 Author Share Posted June 15, 2010 Perfect! Thank You! Link to comment https://forums.phpfreaks.com/topic/204868-simple-php-if-question/#findComment-1072546 Share on other sites More sharing options...
TOA Posted June 15, 2010 Share Posted June 15, 2010 Perfect! Thank You! Glad to help Link to comment https://forums.phpfreaks.com/topic/204868-simple-php-if-question/#findComment-1072548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.