+ 1

Can someone explain why this doesn't work? PHP switch syntax error.

<?php $Store = 'mystore' switch ($Store) { case "mystore": echo "Mystore has this product in stock!"; break; case "EMS": echo "Otherstore has this product in stock!"; break; default: echo "This product is not available in your area."; } ?>

23rd May 2019, 11:19 PM
Jason
Jason - avatar
1 Odpowiedź
+ 2
Missing semicolon in first line : $Store = 'mystore';
24th May 2019, 5:50 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar