Answers for "use php array in javascript"

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

use php array in javascript

var passedArray = <?php echo json_encode($sampleArray); ?>
Posted by: Guest on October-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language