Answers for "transform echo php to array javascript"

PHP
2

set array in javascript from php

//set array in javascript from php array
var jsarry =  <?php echo '["' . implode('", "', $phparry) . '"]' ?>;
Posted by: Guest on December-01-2020
2

php array to js

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

Browse Popular Code Answers by Language