Unknown error@ Control flow switch 1.Glance at he past



//It says"Oops, try again. Please follow the instructions on the Full Preview page to test your code."

//my PHPcode
$myMoney=50000 ;
if($myMoney > 50000){
echo "I'm rich";
elseif ($myMoney < 50000){
echo"I'm mediocre ";



I didn't test your code, but will say, as PHP goes syntax is very strict. This is best handled by writing neat code and minding where we add white space, and where we leave it out. This may not be the issue, but it's worth consideration.

We can write most anything we wish in this exercise, so give this a whirl. If it works then you have something to compare with.

        $a = "warm";
        if ($a=="cold") {
            echo "too cold";
        } elseif ($a=="hot") {
            echo "too hot";
        } else {
            echo "just right";


A post was split to a new topic: Can't really understand the logic