html code
<?php
while($row = mysqli_fetch_assoc($WltQRslt)){
$Ldate = $row['LastDate'];
$Bdate = $row['DateBought'];
$id=sprintf('%s_%s',$Ldate,$Bdate);echo "<tr ><td class='center'><i class='fa fa-database fa-3x' aria-hidden='true'></i> {$row['Server']}</td><td id ='".$row['SNo']."' ><i class='fa fa-line-chart fa-3x'></i> {$row['Profit']}</td><td><i class='fa fa-refresh fa-spin fa-3x fa-fw'></i> <span class='date' date-start='$Bdate' date-end='$Ldate'></span></td>";
}
?>
jquery code
$('table td[id]').each(function (index, element) {
var id = $(element).attr('id');
$.ajax({
url:"get_server.php",
method:"POST",
data:{id:id},
success:function(data) {
var no=data.count;
for(i=0; i<=no;i++) {
var price = data;
console.log(price);
}
}
});
});
this jquery function get all the ID`s of each row contaning ID value. i want that on each iteration it get id from proccess it then move on to another iteration?