title: PHP switch case $_GET's variables and switch case $_GET's variable's values
body: <p>Say I have an URL like <code>www.mysite.com/index.php?login=0</code>. Is it possible to switch case $_GET's variables and switch case $_GET's variable's values?</p>
  
  <p>Something like:</p>
  
  <pre><code>switch ($_GET) {
      case 'login' :
          switch($_GET['login']) {
              case '0' :
                  echo 'Login failed!';
                  break;
              case '1' :
                  echo 'Login successful.';
                  break;
          }
          break;
      case 'register' :
          switch ($_GET['register']) {
              case '0' :
                  echo 'Registration failed!';
                  break;
              case '1' :
                  echo 'Thank you for registering.';
                  break;
          }
          break;
      default :
          echo 'Some other message';
          break;
  }
  </code></pre>
  
  <p>I'm not sure if switch case can be used on associative arrays. What am I doing wrong? Cheers!</p>