I am using:
$.post('fromDB.php', function(data) {
eval(data);
console.log(data);
updateTimer();
});
to get some arrays from php. What php returns:
var todayTimeMinutes = [0, 45, 35, 25, 40, 0, 50, 40, 40, 30, 20];
var todayTimeHours = [0, 8, 9, 10, 10, 11, 11, 12, 13, 14, 15];
var todaySectionName = ["Before School", "Period 1", "Period 2", "Formtime", "Interval", "Period 3", "Period 4", "Lunchtime", "Period 5", "Period 6", "After School"];
console.log("Excecution time: 0.00058889389038086 seconds");
The console.log works fine. When I try to access values from the array inside the success function, it works fine. However, accessing it from updateTimer() does not work, and gives me this message in the chrome debugger: