Author Topic: php question!  (Read 665 times)

0 Members and 1 Guest are viewing this topic.

Offline Octavius

  • EZ's Resident Faggot
  • Serf
  • *
  • Posts: 24
  • Cookies: -36
  • Hasten slowly.
    • View Profile
php question!
« 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;
    }
    
    
?>
« Last Edit: November 15, 2015, 11:53:40 pm by Octavius »
Why do we live, if we live just to die?

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: php question!
« Reply #1 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.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]