title: (Still) Stuck with Twitter Typeahead
body: <p>If I use</p>
  
  <pre><code>var users_bloodhound = new Bloodhound({
      datumTokenizer: function (datum) {
          return Bloodhound.tokenizers.whitespace(datum.value);
      },
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      remote: {url:'https://cdn.rawgit.com/twitter/typeahead.js/gh-pages/data/countries.json',
      filter: function (result) {
          return $.map(result, function (username) {
              return {
                  name: username
              };
          });
      }
        }
  });
  </code></pre>
  
  <p>with the json formatted as <em>["Andorra","United Arab Emirates","Afghanistan",...]</em> it works as expected, but I can't manage to receive the data returned by my .php file with </p>
  
  <pre><code>var users_bloodhound = new Bloodhound({
      datumTokenizer: function (datum) {
          return Bloodhound.tokenizers.whitespace(datum.value);
      },
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      remote: {url:'./search.php?query=%QUERY',
      wildcard: '%QUERY',
      filter: function (result) {
          return $.map(result, function (username) {
              return {
                  name: username
              };
          });
      }
        }
  });
  </code></pre>
  
  <p>(I only changed the part after remote...) The .php file receives the input and logs for example <em>["test01","test02"]</em> as answer to the input 't'. The last two lines of my php file are:</p>
  
  <pre><code>error_log(json_encode($results));
  return json_encode($results);
  </code></pre>
  
  <p>So, how do I make my JS function receive the return value of my php file?</p>