My Code is as such:
for (var i=0; i < numaccounts; i++) {
$.post('assets/ajax/multi-save.php', appointments[i], function(data) {
alert(appointments[i]);
alert(appointments[0]);
});
}
the problem seems to be with my array appointments. The second with the fixed offset of 0 displays fine. The one using 'i' displays as 'undefined'. If I alert(i) it is always '2'.