This forum is now read-only. Please use our new forums at

Control Flow: Switch Forum

View Course » View Exercise

1147 points
Submitted by
Boris Atanasov
almost 3 years ago

Gives me 'Parse error: syntax error, unexpected T_ELSE on line 13 '

Where I do a mistake? It pass me but with that error.

 $var = 34;
 if ($var > 3)  {         
 echo "Drink water!";
  } elseif ($var < 13);  {
echo "Drink more water!";
}   else {          **// this is line 13**
echo "this is not a number! Please add only a number!";

I'd like to know also which ones are already unnecessary to use (brackets) with php code as I read in previous post in the forum here.