更新时间:2022-11-19 11:20:45
可以通过任何方式更改输出吗?引用密钥名称似乎可以使其正常解析:
Any way you can change the output? Quoting the key names seems to allow it to parse normally:
$test = '[{"text":"key 1","value":"value 1"},{"text":"key 2","value":"value 2"},{"text":"key 3","value":"value 3"}]';
var_dump(json_decode($test));