php数据:"["master":["skill_id":"1","master_number":"A","master_name":"概念设计","master_max_score":"15"]]" 如何转换成数组?现在是字符串
时间: 2023-11-20 20:58:19 浏览: 84
可以使用json_decode()函数将该字符串转换为数组。具体代码如下所示:
```php
$str = '{"master":[{"skill_id":"1","master_number":"A","master_name":"概念设计","master_max_score":"15"}]}';
$arr = json_decode($str, true);
print_r($arr);
```
输出结果为:
```
Array
(
[master] => Array
(
[0] => Array
(
[skill_id] => 1
[master_number] => A
[master_name] => 概念设计
[master_max_score] => 15
)
)
)
```
阅读全文