title: How to use if and else inside echo statement?
body: <p>I've heard something about ternary operator but I kind of beginner and don't know how to use it, I'm trying to make this:</p>
  
  <pre><code>                   echo    '&lt;div&gt;
                             '.if(LoginCheck($this-&gt;db) == true):.'
                              &lt;span class="option1"&gt;&lt;/span&gt; 
                             '.else:.'
                             &lt;span class="option1"&gt;&lt;/span&gt;                             
                             '.endif;.'
                             &lt;/div&gt;';
  </code></pre>