title: Inline PHP / HTML Ternary If
body: <p>I am trying to do the following:</p>
  
  <pre><code>&lt;li &lt;?PHP ($this-&gt;pageName == 'index' ? ?&gt;class="current"&lt;?PHP : '')?&gt;&gt;&lt;a href=""&gt;Home&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>But it is not working.</p>
  
  <p>Is what I'm trying to achieve possible? If so what am I doing wrong?</p>
  
  <hr>
  
  <p>I know it's not hard to put PHP in HTML lol. I was curious if a ternary operator could be used in a way that is similar to:</p>
  
  <pre><code>&lt;?PHP if(1 == 1){?&gt;
  &lt;p&gt;Test&lt;/p&gt;
  &lt;?PHP }?&gt;
  </code></pre>