All On Your Own! PLS Help


Hey, this is my code, but i got "Oops, try again. Make sure you have three case blocks!". Any help?

$myAge = 24;
switch ($myAge) {
case "24";
echo "I'm 24 years old :))),and I'm codding PHP Like a Champ";
case "25";
echo "I will be 25 this fall";
case "23";
echo "I was 23 alrdy";
case "26";
echo "Still long way to go";
echo "I'm neiher 23, 24, 25, or 26";


I have figure it out what is the problem, just changed ; with : after echo's.


The numbers in the cases should not be strings but number literals.


Tnx, i saw this too:(


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.