Link to home
Start Free TrialLog in
Avatar of BrighteyesDesign
BrighteyesDesignFlag for Afghanistan

asked on

Display content depending on multiple values

I am displaying an element on  a page depending on whether the element 'SSContact' is empty or not...

<?php if(!empty($row_Diolist['SSContact'])): ?>

What I need to do is show that contact box if there is a a value in either SSContact, SSPhone or SSEmail so along the lines of...

<?php if(!empty($row_Diolist['SSContact'])): OR if(!empty($row_Diolist['SSphone'])):  OR if(!empty($row_Diolist['SSemail'])):?>

I know the code above is wrong but any ideas on how it should be?

User generated image
Avatar of Radek Baranowski
Radek Baranowski
Flag of Poland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please see

Are you thinking of displaying whatever information is available?  For example, would you display the SSContact and SSemail if that is all the data you have?  If so, a little more logic might be in order.  Pidgin example:

if (SSContact)
    display SSContact
    if (SSphone) display SSphone
    if (SSemail) display SSemail