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! Quote Link to comment 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 } Quote Link to comment Share on other sites More sharing options...
danweav Posted June 15, 2010 Author Share Posted June 15, 2010 Perfect! Thank You! Quote Link to comment Share on other sites More sharing options...
TOA Posted June 15, 2010 Share Posted June 15, 2010 Perfect! Thank You! Glad to help Quote Link to comment 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.