json_encode()和json_decode()的用法

来源:互联网 发布:登陆淘宝联盟 编辑:程序博客网 时间:2024/05/09 10:31
mixed json_decode ( string $json [, bool $assoc ] ) 

接受一个 JSON 格式的字符串并且把它转换为 PHP 变量 

返回值 
Returns an object or if the optional assoc parameter is TRUE, an associative array is instead returned. 



string json_encode ( mixed $value [, int $options = 0 ] ) 
返回 value 值的 JSON  格式的php字符串

0 0
原创粉丝点击