Jquery autocomplete list
<p>The jquery function that I'm using is:</p>

<pre><code>$.getJSON("rpc2.php?queryString=" +inputString+"", function(data) { 
if(data.length &gt;0) {
$.each(data, function(i, data){
var city= data.city;
var country= data.country;
$('#suggestions').show();
$('#autoSuggestionsList').html('&lt;li&gt;'+ city+'&lt;/li&gt;');
 });
 }
 });
</code></pre>

<p>The PHP looks like:</p>

<pre><code>if(strlen($queryString) &gt;0) {
$query = "SELECT * FROM cities WHERE city_accented LIKE '$queryString%' LIMIT 5";
$result = mysql_query($query) or die("There is an error in database");
$json = array();
while($row = mysql_fetch_array($result)){
$json['city'] = $row['city_accented'];
$json['country'] = $row['country'];
$data[] = $json;  
}
}
print json_encode($data);
</code></pre>

<p>The response that I'm getting from PHP is:</p>

<pre><code>[{"city":"Lors","country":"ad"},{"city":"Lo Serrat","country":"ad"},{"city":"Lobabi","country":"af"},{"city":"Lobya","country":"af"},{"city":"Locakan","country":"af"}]
</code></pre>

<p>The problem is that in autoSuggestionsList DIV only the first city is listed, not all five from PHP response. Why there is no other cities from php response in autoSuggestionsList div?</p>
