php to js array code example
Example 1: php array to js
var arrNums = json_encode(<?php echo $arrNums; ?>);
Example 2: convert a php array into a javascript array
var js_array = [<?php echo '"'.implode('","', $disabledDaysRange ).'"' ?>];
var arrNums = json_encode(<?php echo $arrNums; ?>);
var js_array = [<?php echo '"'.implode('","', $disabledDaysRange ).'"' ?>];