Error php syntax error, unexpected 'case' (T_CASE) [closed]

-1

Does anyone know what this error can be caused in PHP? This is the switch and it gives an error in the line that will highlight with an arrow

    switch(strtolower($_FILES['FileInput']['type']))
{
        case 'audio/3ga': <---
        case 'audio/3gpp':
        case 'audio/3gpp2':
        case 'video/quicktime': //when recording on iOS devices the mov container is used. It contains AAC sound.
        case 'audio/mpeg'://in case of selecting an already existing recording
            break;
        default:
            die('{"s":0,"e":"Unsupported file type '.$_FILES['FileInput']['type'].'"}');
}
    
asked by Santiago D'Antuoni 07.03.2017 в 15:29
source

1 answer

-1

uses double quotes, the switch you are doing based on a String, so if we want to compare it as a string we must use double quotes, instead of single quotes, because in some programming languages (I do not know if this is synonymous) , single quotes are used for characters not for strings.

    
answered by 07.03.2017 / 15:38
source