富贵资源网 Design By www.hznty.com

json传递(一维数组)

js代码

<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js">

php代码

<"id"=>$id, "name"=>urldecode($name), "gender"=>urldecode($gender));
	echo json_encode($arr2);
"htmlcode">
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js">

JQuery ajax 返回json时出现中文乱码该如何解决:https://www.jb51.net/article/72245.htm

php代码

<?php
/*
	write by lizhi 
	2009-10-26
*/
$json = array ( 
 0 => 
 array ( 
  'id' => '13', 
  'name' => 'lizhi', 
 ), 
 1 => 
 array ( 
  'id' => '17', 
  'name' => 'admin', 
 )
 );
echo json_encode($json);
?>

富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com