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

Control Flow: Switch Forum

View Course » View Exercise

62 points
C832aa84795d79c9a73a8566343507c0?s=140&d=retro
Submitted by
blopienski
over 2 years ago

Parse error: syntax error, unexpected 'case' (T_CASE) help!

ok, so when I checked the code, it said there was an error with case 'Remove Duplicates':

Here is the section of code itself if (isset($GET['action'])) {
if ((file
exists("songorganizer/songs.txt"))
&& (filesize("songorganizer/songs.txt")
!= 0)) {
$SongArray = file("songorganizer/songs.txt");
switch ($_GET['action']) {
} // End of the switch statement
}
}
case 'Remove Duplicates':

Now I've searched on google and supposedly there is supposed to be something above the error text in question that's causing said error, but as far as I can see, there's no mistakes to be found, I am very confused and wold appreciate some help


0 votes

permalink

Hi there,

I think you'll have better luck if you ask somewhere like CodeHive :)

2818 points
5674c6dae39efec455000434_879409444
Submitted by
Zeke Y
over 2 years ago