- json_decode: documentation ( source)
- print_r: documentation ( source)
<?php
$json = ' {
"responses": [
{
"safeSearchAnnotation": {
"adult": "VERY_UNLIKELY",
"spoof": "VERY_UNLIKELY",
"medical": "UNLIKELY",
"violence": "LIKELY"
}
}
]
}';
print_r(json_decode($json, true));