";print_r(json_decode($json));echo "
";//解码显示,参数二true,返回array数组类型var_dump(json_decode($json,true));echo "<._php json_decode">
赞
踩
- <?php
- //json格式
- $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
- //解码显示,参数二默认false,返回对象类型
- var_dump(json_decode($json));
- echo "<br>";
- print_r(json_decode($json));
- echo "<br>";
- //解码显示,参数二true,返回array数组类型
- var_dump(json_decode($json,true));
- echo "<br>";
- print_r(json_decode($json,true));
- echo "<br>";
-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。