Placing PHP array values into a javascript array?
- by Michael Harringon
Is these a way i can loop through a PHP array and have the data outputted into a JavaScript array?
For example, the JS script below will not work
var mon_Loop = <?php echo $rowCount_Mon ?>;
var mon_Events = new Array();
for(i = 0; i < mon_Loop; i++)
{
mon_Events[i] = <?php $divMon[i] ?>
}
I Know its because the "i" is not a…