title: PHP 7 - Alternative Syntax else if that has HTML inside?
body: <p>my apologies if there's an answer to this on SO somewhere. I searched around with no avail.</p>
  
  <p>I'm wondering if there's alternative syntax for else if with HTML inside exists. I know there's such alternative syntax for if and else, but couldn't find anything in the PHP documentation for else if.</p>
  
  <p>Right now I have this code:</p>
  
  <pre><code>&lt;?php if($err) : ?&gt;
      &lt;div class="alert-failure"&gt;&lt;?php echo "Error: " . $err; ?&gt;&lt;/div&gt;
  &lt;?php endif; ?&gt;
  &lt;?php if ($success): ?&gt;
      &lt;div class="alert-success"&gt;&lt;?php echo "Success: " . $success; ?&gt;&lt;/div&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>But this seems illogical since my app won't be having an error if it's successful. Is there a way to use else if here? Thanks in advance!</p>