All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

My "or" is not working

  • # August 12, 2014 at 7:11 am

    What is wrong with the first line?

    <? if ($name == Meritor || Meritor2) {
    echo ‘ ‘;
    } else {
    echo ‘s’;
    }
    ?>

    Thanks!

    # August 12, 2014 at 7:13 am

    This reply has been reported for inappropriate content.

    
    <? if ($name == 'Meritor' ||  $name == 'Meritor2') {
    

    This should do the trick.

    # August 12, 2014 at 7:18 am

    Perfect thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed