I didn't know what to write about the title of the problem:) I want to add a string to the query but I get internal 500 error
$arr = json_decode($json, true);
$name = "Peter";
echo $arr[$name]; // Output: 65
It's correct but,
$obj = json_decode($json);
echo $obj->$name;
not working.
Of course this is not normal code but caybe this could be a method?