After json_decode I have this array. How to turn on the key and get the value?
stdClass Object ( [$] => on )
$data->{'$'}
For access to fields of objects that have spaces, hyphens, etc. in the title. characters not satisfying the naming of variables and fields use the syntax $object->{'my-field name'} :
$object->{'my-field name'}
$json = '{ "$": 123, "test": 2343 }'; $data = json_decode($json); print_r([ $data->{'$'} ]);
Source: https://ru.stackoverflow.com/questions/667565/More articles:How to upload video to server?Downloading files with the shellImplementation of regular tassingBitrix has not created a temporary download directory.Add prefix to ageHow to get a stable link to a java FXML application controllerThere is no processing after selecting a file on the html pageRead text fileNeed help with SQL queryHow to add title, description, keywords for each category in php site?All Articles
$data->{'$'}? - teran