json_decode和json_encode的区别

1.json_decode() 

json_decode 
(PHP 5 >= 5.2.0, PECL json >= 1.2.0) 

json_decode — 对 JSON 格式的字符串进行编码 

说明 
mixed json_decode ( string $json [, bool $assoc ] ) 
接受一个 JSON 格式的字符串并且把它转换为 PHP 变量 

2.json_encode() 

json_encode 
(PHP 5 >= 5.2.0, PECL json >= 1.2.0) 

json_encode — 对变量进行 JSON 编码 

posted @ 2016-12-02 22:29  yangchaojie  阅读(1844)  评论(0编辑  收藏  举报