json和php数组 格式的互相转换

来源:互联网 发布:linux无法使用vim 编辑:程序博客网 时间:2024/05/02 02:47
$json_arr = array('WebName'=>'PHP网站开发教程网','WebSite'=>'xxxxx'); $php_json = json_encode($json_arr);  //把php数组格式转换成 json 格式的数据echo $php_json; $php_json = json_decode($php_json);   //再把json格式的数据转换成php数组print_r($php_json);

0 0
原创粉丝点击