title: php best practices for returning multiple lines of content in an IF statement
body: <p>I am writing a php plugin for wordpress. I'm trying to be mindful of clean coding and want to know the best practice for returning several lines of HTML code in an IF statement. </p>
  
  <p>Obviously I know about <code>echo</code> but I thought I had seen a technique like this used, but it doesn't seem to work for me. The idea being that you create several $content variables and then return it outside of the IF statement.</p>
  
  <pre><code>function signup() {
      if(!Skizzar_Registration::is_skizzar_site_active()) {
          $content = '&lt;div class="signup"&gt;';
          $content .= '&lt;h1&gt;Sign up&lt;/h1&gt;';
          $content .= '&lt;/div&gt;';
      } else {
          $content = '&lt;div class="signed_up"&gt;you are already signed up&lt;/div&gt;';
      }
  
      return $content;
  
  }
  </code></pre>
  
  <p>Currently though this returns nothing when I call the function</p>