合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
``` <?php $data = array ( array ( 'entity_id' => '880', 'sku' => '100088', 'name' => 'Tablet PC 512MB RAM 8GB Memory Wi-Fi Camera(Black)', 'price' => '117.8300', 'item' => array ( array ( 'attribute_id' => '103', 'frontend_label' => 'Meta Title', 'value' => NULL, ), array ( 'attribute_id' => '972', 'frontend_label' => 'Features', 'value' => '131,201,129', ), array ( 'attribute_id' => '992', 'frontend_label' => 'Battery capacity', 'value' => '5500mAh', ), ), ), ) ``` 怎样修改attribute_id = 972的value值呢,把131,201,129换成其它的值。谢谢! 方法: ``` foreach($data as &$item){ foreach($item['item'] as &$v){ if($v['frontend_label']== 'Features'){ $v['value'] = '123,123,123'; } } } ```