$res = mysql_query("SELECT * FROM `basket` WHERE `account_id` = '$_SESSION[ID]'");
while($row = mysql_fetch_assoc($res)) {
$search = $row['number'];
echo $search;
}
What I'm attempting to do is use an Ajax call to this PHP file, and then the "echoed" data i want to parse and place inside a div, here's the Ajax call
$(document).ready(function() {
var data = "func=basket";
$.ajax({
url: "functions/ajax.php",
data: data,
type: "GET",
success: function(data, textStatus, jqXHR){
$("#response").html(data);
},
error: function (jqXHR, textStatus, errorThrown){
console.log('Error ' + jqXHR);
}
});
});
But the problem I'm having is that it's not parsing the data until EVERY while($row etc..
is processed, i want to return echo row 1 by 1, how would i go about doing that