1 回答

慕的地6264312
TA貢獻1817條經驗 獲得超6個贊
$arr = [ [ 'code' => 'site_name', 'name' => '網站名稱', 'value' => '管理系統', 'type' => 'text', 'box' => '', 'tab' => 'main', 'sort' => '1' ], [ 'code' => 'site_title', 'name' => '網站標題', 'value' => '管理系統', 'type' => 'text', 'box' => '', 'tab' => 'main', 'sort' => '2' ], [ 'code' => 'site_keywords', 'name' => '關鍵詞', 'value' => '管理系統', 'type' => 'text', 'box' => '', 'tab' => 'main', 'sort' => '3' ], [ 'code' => 'site_description', 'name' => '站點描述', 'value' => '管理系統', 'type' => 'text', 'box' => '', 'tab' => 'main', 'sort' => '4' ]]; function merge($arr){ $ret = []; foreach ($arr as $item) { $ret[$item['code']] = $item['value']; } return $ret;} print_r(merge($arr));
- 1 回答
- 0 關注
- 605 瀏覽
添加回答
舉報
0/150
提交
取消