Answers for "convert php array variable to 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
0

dump php array into javascript array

//in js do this
var masterarray =  <?php echo '["' . implode('", "', $masterarray) . '"]' ?>;
Posted by: Guest on November-02-2020

Code answers related to "convert php array variable to javascript"

Browse Popular Code Answers by Language