Home > Backend Development > PHP Tutorial > action 发生的数组 传回界面

action 发生的数组 传回界面

WBOY
Release: 2016-06-13 12:03:54
Original
1242 people have browsed it

action 产生的数组 传回界面
如题,我界面上有个表单,点完提交,后面action进行了相关处理,最终产生了一个二维数组,我前台有一个jquery 的datetable的插件,我想接收后面action产生的那个数组,代码该如何弄写,给个简单的例子吧

 	$sql = "select a.id,a.sname,a.dname,b.path,a.ctime,venderid,vendername,email from upload_log a join file_out_log b on a.id=b.id join vender c on b.outname=c.venderid where a.dname='".$fileinfo[0][savename]."'";<br />      <br />      	$res4=mysql_query($sql) or die ($sql." not sucess ");<br />      	<br />      	while($row = mysql_fetch_array($res4,MYSQL_ASSOC )){<br />      	$arr6[]=$row;	<br />      	}<br />      	var_dump($arr6);<br />      	
Copy after login

$arr6就是产生的数组,我前面的js如何拿到这个数组???

------解决方案--------------------
echo json_encode($arr6);

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template