在下面的示例中,您具有一个PHP数组,然后首先通过一个PHP数组创建一个Javascript数组:
<script type="javascript"> day = new Array(<?php echo implode(',', $day); ?>); week = new Array(<?php echo implode(',',$week); ?>); month = new Array(<?php echo implode(',',$month); ?>); <!-- Then pass it to the Javascript function: --> drawChart(<?php echo count($day); ?>, day, week, month);</script>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)