how to fetch php array in javascript code example
Example 1: php array to js
var arrNums = json_encode(<?php echo $arrNums; ?>);
Example 2: copy php array to javascript
var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];
var arrNums = json_encode(<?php echo $arrNums; ?>);
var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];