title: PHP : ternary operator
body: <p>This seems like a very simple question but everything I try, gives me an error.</p>
  
  <pre><code>    if ( $query_results-&gt;have_posts() ) :   
      $count_results = $query_results-&gt;found_posts;
  </code></pre>
  
  <p><strong>Question: How to add <code>else</code> statement/functionality to this code?</strong></p>
  
  <p>I've tried to add parentheses &amp; <code>else</code>, I've also tried all combinations with <code>:</code> and <code>?</code>. Nothing works..</p>