title: PHP switch not working as expected
body: <p>I have a PHP class called ResetPassword. Within this class is a switch which will return a different string containing the required HTML.</p>
  
  <p>This is the code below (I have omitted a few of the cases for the sake of brevity, there is also a default case which returns NULL)</p>
  
  <pre><code>    public function get_display_block($displayblock) {
       switch ($displayblock) {
      case 'EnterNewPassword':
          $displayblock = '
                          &lt;form action="resetpassword.php" method="post"&gt;
                          &lt;fieldset class="login"&gt;
                          &lt;legend&gt;Enter your information in the form below to reset your password: &lt;/legend&gt;
                          &lt;div&gt;&lt;label for="password1"&gt;Password :&lt;/label&gt;
                          &lt;p&gt;&lt;input type="password" name="password1" size="40" maxlength="60" /&gt;&lt;/p&gt; &lt;/div&gt;
                          &lt;div&gt;&lt;label for="password2"&gt;&lt;span class="required"&gt;*&lt;/span&gt;Retype Password :&lt;/label&gt;
                          &lt;p&gt;&lt;input type="password" name="password2" size="40" maxlength="60" /&gt;&lt;/p&gt;  &lt;/div&gt;
  
                          &lt;br /&gt;
                          &lt;/fieldset&gt;&lt;br /&gt;
                          &lt;br /&gt;
                          &lt;div align="center"&gt;&lt;input type="submit" name="submit" value="Submit My Information!" \&gt;&lt;/div&gt;
                          &lt;/form&gt;
                          ';
              return $displayblock;
          break;
  
      case 'THIS_ISNT_WORKING':
          $displayblock = '
                          &lt;form action="changepassword.php" method="post"&gt;
                          &lt;fieldset class="login"&gt;
                          &lt;legend&gt;Enter your information in the form below to reset your password: &lt;/legend&gt;
                          &lt;div&gt;&lt;label for="password1"&gt;Old Password : &lt;/label&gt;
                          &lt;p&gt;&lt;input type="password" name="oldpassword" size="40" maxlength="60" /&gt;&lt;/p&gt; &lt;/div&gt;
                          &lt;div&gt;&lt;label for="password1"&gt;New Password :&lt;/label&gt;
                          &lt;p&gt;&lt;input type="password" name="password1" size="40" maxlength="60" /&gt;&lt;/p&gt; &lt;/div&gt;
                          &lt;div&gt;&lt;label for="password2"&gt;&lt;span class="required"&gt;*&lt;/span&gt;Retype New Password :&lt;/label&gt;
                          &lt;p&gt;&lt;input type="password" name="password2" size="40" maxlength="60" /&gt;&lt;/p&gt;  &lt;/div&gt;
  
                          &lt;br /&gt;
                          &lt;/fieldset&gt;&lt;br /&gt;
                          &lt;br /&gt;
                          &lt;div align="center"&gt;&lt;input type="submit" name="submit" value="Submit My Information!" \&gt;&lt;/div&gt;
                          &lt;/form&gt;
                          ';
          return $displayblock;
       break;
  }  // end of switch
  
  } //end of method
  </code></pre>
  
  <p>When calling the class/switch on my main page, The below code works fine.</p>
  
  <pre><code>$reset = new ResetPassword(); 
  $displayblock = $reset-&gt;get_display_block('EnterSecretAnswer');
  </code></pre>
  
  <p>However, when attempting to call THIS_ISNT_WORKING nothing displays.
  A var_dump on $displayblock returns NULL.</p>
  
  <pre><code>$reset = new ResetPassword();
  $displayblock = $reset-&gt;get_display_block('THIS_ISNT_WORKING');
  var_dump($displayblock);
  </code></pre>
  
  <p>If I call any of the other cases (the ones omitted previously) it returns the required HTML.</p>
  
  <p>Can anyone see something I am missing here? 
  Any help as usual would be greatly appreciated.</p>
  
  <p>EDIT: I have updated the switch as requested below so that the return statement is outside the switch. The end result is still the same.
  I have also changed the default case to return a string ("abcd") just to verify that the default case wasn't be called, and it wasnt. Still returning NULL.</p>