json_decode($json, true) true什么意思
发布时间:2020-05-25 03:01:06 所属栏目:PHP 来源:互联网
导读:?php$json = {a:1,b:2,c:3,d:4,e:5};var_dump(json_decode($json));var_dump(json_decode($json, true));?结果:object(stdClass)[1]public a = int 1public b = int 2public c = int 3public d = int 4public e = int 5array (size=5)a = int 1b = int 2c =
|
<div class="cnblogs_code"> var_dump(json_decode($json)); 结果: int 1 public 'b' => int 2 public 'c' => int 3 public 'd' => int 4 public 'e' => int 5array (size=5) true返回值是数组,否则返回值为object (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
