I have an array that is looping and each one of them needs to go through a ajax/php function. However this doesn't seem to be working. Can you show me a correct way of doing this?
for (var i = 0; i < arr.length; i++) {
$.ajax({
type: "POST",
data: "data=" + arr[i],
url: "proxy.php",
success: function(msg){
$("#test").html(msg+msg);
}
});
}
The id "test" needs to contain all the vals gotten from php.