码迷,mamicode.com
首页 > 编程语言 > 详细

在线转换JSON与PHP数组(json php array)

时间:2015-10-25 13:42:25      阅读:1239      评论:0      收藏:0      [点我收藏+]

标签:

在线转换json与php数组

www.jsonaz.com

例如json数据

{
    "number" : 1,
    "tuple" : [1,2,3],
    "dict" : {
    	"a": "apple",
        "b": "banana"
    },
    "complex": {
        "person": {
            "name" : "alice",
            "gender": "female",
            "age": 19,
            "friends": [
                "Adam","Bob","Candy"
            ],
            "religions":[]
        }
    }
}

将被转换为php数组

array(
    "number" => 1,
    "tuple" => array(
        0 => 1,
        1 => 2,
        2 => 3,
    ),
    "dict" => array(
        "a" => "apple",
        "b" => "banana",
    ),
    "complex" => array(
        "person" => array(
            "name" => "alice",
            "gender" => "female",
            "age" => 19,
            "friends" => array(
                0 => "Adam",
                1 => "Bob",
                2 => "Candy",
            ),
            "religions" => array(),
        ),
    ),
)

备注

域名正在备案,目前只能通过IP访问。

鸣谢

 

在线转换JSON与PHP数组(json php array)

标签:

原文地址:http://www.cnblogs.com/limzz/p/4908562.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!