EvilZone

Programming and Scripting => Web Oriented Coding => Topic started by: Octavius on November 15, 2015, 11:35:03 PM

Title: php question!
Post by: Octavius on November 15, 2015, 11:35:03 PM
Code: [Select]
<?php
    $test 
"evilzone";
    
    switch (
$test) {
        case 
'notice me senpai':
            echo 
"notice me";
            break;
    }
    
    
?>

so I keep trying to submit but i keep receiving a error saying that I have not added the default case? can anyone help and point out the error


Update:

I figured it out xD , so simple but caused me some delay
Code: [Select]
<?php
    $test 
"evilzone";
    
    switch (
$test) {
        case 
'notice me senpai':
            default:
            echo 
"notice me";
            break;
    }
    
    
?>
Title: Re: php question!
Post by: kenjoe41 on November 23, 2015, 03:13:34 AM
If you are doing a Switch...case, why in the hell do you have only the default case, it is supposed to be the last resort when all fails, i need to sees some othe cases bro.