I have an ajax problem:
foreach(ids as id){
$.ajax({
url:\'script.php\',
data:\'id=\'+id,
cache:false,
});
}
If I loop 6 ti
Why not sending all id's to the script and then loop them is faster en more accurate..
Javascript:
// you can send the whole array in once i think not for sure
$.ajax({
url:'script.php',
type: 'POST',
data: ids,
cache:false,
success:function(msg)
{
// when done
}
});
script.php:
foreach($_POST as $id)
{
[............] // do your thing
}