title: inline elseif in PHP
body: <p>Is there a way to have an inline if statement in PHP which also includes a elseif?</p>
  
  <p>I would assume the logic would go something like this:</p>
  
  <pre><code>$unparsedCalculation = ($calculation &gt; 0) ? "&lt;span style=\"color: #9FE076;\"&gt;".$calculation : ($calculation &lt; 0) ? "&lt;span style=\"color: #FF736A;\"&gt;".$calculation : $calculation;
  </code></pre>