`
paulfzm
  • 浏览: 873231 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

php json 格式

    博客分类:
  • Php
阅读更多
<?php
$arr = array(   'name' =>'名字',   'nick' => '深空',   'contact' => array(   'email' => 'shenkong at qq dot com',   'website' => 'http://www.test.com',   )   );  
 $json_string = json_encode($arr);   
 $obj = json_decode($json_string);  
 $obj =json_decode($json_string,true);  //调用方便可以转成array
 print_r($obj);   
?> 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics