js解析php数组
<script language="javascript"> var str; //$file = 'config/config.xml'; str = '<?php $info = array(); array_push($info,"folder1"); array_push($info,"folder2"); echo json_encode($info); ?>'; var list = eval(decodeURIComponent(str)); alert(list[0]); for(var i=0;i<8;i++){ document.write("<div class='movieImg'>"); document.write("<a href='video.php' target='_Blank'><div class='selected'></div></a>"); document.write("<a href='#' target='_Blank'><img src='images/movie1.jpg' alt='movie' /></a>"); document.write("</div>"); } </script>