我有一个示例代码:
$json_encode = '{"OS":"Android","Title":"Galaxy"}';
$json_decode = json_decode($json_encode);
foreach($json_decode as $key => $value) {
if($key == 'Title') {
unset($key);
}
}
print_r(json_encode($json_decode));
但是结果不能remove key='Title'
来自那个json字符串,如何解决?