set array in javascript from php 1

set array in javascript from php

//set array in javascript from php array
var jsarry =  ;

Here is what the above code is Doing:
1. Create a PHP array
2. Convert the PHP array to a JSON string
3. Echo the JSON string
4. Assign the JSON string to a JavaScript variable
5. Convert the JSON string to a JavaScript array

Similar Posts