需要使用php [duplicate]解析json数组

This question already has an answer here:

i have a json array like below,

{
    "months": {
        "1": ["1"],
        "2": ["10"]
    },
    "days": {
        "1": ["1", "2"],
        "2": ["2", "3"]
    }
}

i need to parse this in php. Need months and days values. Thanks in advance..

</div>

why you don't use json_decode() function?

$json = '{
"months": {
    "1": ["1"],
    "2": ["10"]
},
"days": {
    "1": ["1", "2"],
    "2": ["2", "3"]
}
}';

$decoded = json_decode($json);
var_dump($decoded);