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

PHP100 2019-03-28

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

相关推荐