- json_decode: documentation ( source)
- print_r: documentation ( source)
<?php
$key = array('accounts', 1, 'uid');
$conf = json_decode('{
"accounts": {
"1": {
"uid": "1"
},
"2": {
"uid": "16"
}
},
"online": [
{
"rules": {
"language": "pl"
},
"tag": {
"name" : "kraj",
"value": "Polska",
"save" : true,
"delay": 1800
}
}
]
}',true);
print_r($conf['accounts'][1]['uid']);