title: Returns only one object JSON instead multiple objects PHP?
body: <p>Firstly, please take a look this JSON
  <a href="http://ws.luyencong.net/data/search/query.php" rel="nofollow">http://ws.luyencong.net/data/search/query.php?do=json</a></p>
  
  <p>Here is it's code:</p>
  
  <pre><code>/* --- Execute query and get the data. --- */
  $query = $db-&gt;query("SELECT t.* FROM ".TABLE_PREFIX."threads t");
  while($data = $db-&gt;fetch_array($query))
  {
      $results[] = array($data['subject'] =&gt; $data['subject']);
      $json = json_encode($results, JSON_FORCE_OBJECT);
  }
  
  /* --- Print the results to the screen, for future purposes. --- */
  echo $json;
  </code></pre>
  
  <p>But I want the output JSON format will look like this: <a href="http://ws.luyencong.net/data/search/json.txt" rel="nofollow">http://ws.luyencong.net/data/search/json.txt</a></p>
  
  <p>Help will be appreciated. Thanks for anything.</p>
  
  <p>Have a good day!</p>