I\'m trying to create a common constants file to share between php and javascript, using JSON to store the constants. But I\'m wondering why pass the JSON from PHP to javasc
Passing PHP JSON to Javascript and reading var stuff = ; var arr = new Array(); arr= JSON.parse(stuff); document.write((arr[0].cust_code );
var stuff = ; var arr = new Array(); arr= JSON.parse(stuff); document.write((arr[0].cust_code );