You can do simply json_encode
var jsarray = <?php json_encode($php_array)?>;
Find length of array:
alert(jsarray.length);
solved PHP Array variable to Javascript variable [closed]
You can do simply json_encode
var jsarray = <?php json_encode($php_array)?>;
Find length of array:
alert(jsarray.length);
solved PHP Array variable to Javascript variable [closed]