- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
$json = <<<JSON
{"general":{
"round-corner":"0",
"border-stroke":"2",
"background-color äü??$%§":"#ffffff"
}
}
JSON;
$obj = json_decode($json);
$keyName = "round-corner";
var_dump($obj->general->{'round-corner'});
var_dump($obj->general->$keyName);
var_dump($obj->general->{'background-color äü??$%§'});