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

php

#1

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

//my PHPcode
<?php
$myMoney=50000 ;
if($myMoney > 50000){
echo "I'm rich";
}
elseif ($myMoney < 50000){
echo"I'm mediocre ";
}
else{
echo"meh!";
}

?>

#2

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.

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

#3

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