title: Conditional search result statement
body: <p>I am creating a custom search.php and would like to know how to return a different statement based on the number of search results. I would like a different statement for each of three scenarios:</p>
  
  <ol>
  <li>No results are returned</li>
  <li>One result is returned</li>
  <li>More than one result is returned</li>
  </ol>
  
  <p>So in the first example the page will return No results where returned. In the second: Your search for X returned one result. And in the third: Your search for X returned Y results.</p>
  
  <p>OK, hope that explains what I am trying to do. So here is the code I have so far:</p>
  
  <pre><code>&lt;?php
  global $wp_query;
  $total_results = $wp_query-&gt;found_posts;
  ?&gt;
  Your search for &lt;span class="style"&gt;&lt;?php echo get_search_query(); ?&gt;&lt;/span&gt; returned &lt;span class="style"&gt;&lt;?php echo $total_results; ?&gt;&lt;/span&gt; results.
  </code></pre>
  
  <p>So I am able to print out the third option, are there some conditionals I can use with this or any other code to create the different statements I mentioned above?</p>