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..
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..
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);