0

Guys what is wrong with my code? Why it gives me an output "hi"! Can you explain it to me. Please. Thank You!

<?php
        $a = "Unemployed";
        if ($a == "Employed, Locally" or "Employed, Abroad"){
            echo "hi";
            }
        elseif ($a == "Unemployed"){
            echo "hello";
            }
      ?>
3
Contributors
3
Replies
15
Views
2 Years
Discussion Span
Last Post by bLuEmEzzy
1

`

 <?php
    $a = "Unemployed";
    if ($a == "Employed, Locally"  || $a == "Employed, Abroad"){
    echo "hi";
    }
    elseif ($a == "Unemployed"){
    echo "hello";
    }
    ?>`
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.