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

Control Flow: Switch Forum

View Course » View Exercise

1146 points
55d6c265937676eae7000628_259096068?awsaccesskeyid=akiajkz7qvqfd72xnj3q&expires=1496095506&signature=nibfdjl0jrta%2by6en4qnmp%2fckc0%3d
Submitted by
Boris Atanasov
almost 2 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.

  <?php
 $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.
Thanks!