PHP生成数组再传给js的方法

6年以前  |  阅读数:967 次  |  编程语言:PHP 

    <script type="text/javascript">
      var slist = '<?php echo urlencode(json_encode($data['arr']));?>';
      var list = eval(decodeURIComponent(slist));
      drawGpsMap(list);
    </script>

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8