Home >Backend Development >PHP Tutorial >PHP生成数组再传给js的方法_PHP

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

WBOY
WBOYOriginal
2016-05-31 19:31:04727browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn