Afternoon all. The code below works perfectly, however, I need to pull each row of the php sql array out and into the script var. Any ideas on how to write a while loop that could do this? Thanks for any help
var enableDays = ["<?php echo mysql_result($result, 0, 'date'); ?>"];
enableDays.push("<?php echo mysql_result($result, 1, 'date'); ?>");
Additional Code::
$rows = array();
while ($row = mysql_fetch_assoc($result))
{
$rows[] = $row;
}
var enableDays = [<?php echo json_encode($rows); ?>];
console.log(enableDays[1]);