send array php to javascript code example
Example 1: php array to js
var arrNums = json_encode(<?php echo $arrNums; ?>);
Example 2: laravel array to js
var app = @json($array);
var arrNums = json_encode(<?php echo $arrNums; ?>);
var app = @json($array);