Pass data structure from PHP to JS
In JS:
var ap_radioMode = unserialize('<?php echo serialize ($ap_radioMode) ?>');
i.e. Use PHP's serialze() and echo out the value, then apply JS's counterpart unserialize() to get the data structure.
In JS:
var ap_radioMode = unserialize('<?php echo serialize ($ap_radioMode) ?>');
Posted by Ginger at 3:32 PM
No comments:
Post a Comment