Answers for "how to fetch php array in javascript"

PHP
2

php array to js

var arrNums = json_encode(<?php echo $arrNums; ?>);
Posted by: Guest on June-22-2020
1

copy php array to javascript

var js_array = [<?php echo '"'.implode('","', $php_array).'"' ?>];
Posted by: Guest on March-29-2020

Browse Popular Code Answers by Language