title: jQuery UI autocomplete from remote datasource example
body: <p>I'm working on getting jQuery UI autocomplete to work from a remote datasource.  <a href="http://jqueryui.com/demos/autocomplete/#remote" rel="nofollow">http://jqueryui.com/demos/autocomplete/#remote</a></p>
  
  <p>The sample code calls a php script <code>search.php</code></p>
  
  <pre><code>$(function() {
      $( "#birds" ).autocomplete({
          source: "search.php",
          minLength: 2
      });
  });
  </code></pre>
  
  <p><strong>First lines from code snippet from search.php</strong></p>
  
  <pre><code>$q = strtolower($_GET["term"]);
  if (!$q) return;
  $items = array( //set a bunch of key-value pairs);
  </code></pre>
  
  <p>What exactly does <code>$q = strtolower($_GET["term"]);</code> mean?  Doesn't <code>!q</code> always evaluate as true causing the .php script to return, thus preventing the rest of the script from executing?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>As a reference if you go to <a href="http://jqueryui.com/download" rel="nofollow">http://jqueryui.com/download</a> and download the autocomplete package, the exact example I'm referring to is referenced in </p>
  
  <ul>
  <li>development-bundle/demos/autocomplete/search.php   </li>
  <li>development-bundle/demos/autocomplete/remote.html</li>
  </ul>