mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 23:50:38 +08:00
@@ -260,7 +260,7 @@ $array = [
|
||||
['id' => '123', 'name' => 'aaa', 'class' => 'x'],
|
||||
['id' => '124', 'name' => 'bbb', 'class' => 'x'],
|
||||
['id' => '345', 'name' => 'ccc', 'class' => 'y'],
|
||||
);
|
||||
];
|
||||
|
||||
$result = ArrayHelper::map($array, 'id', 'name');
|
||||
// 结果是:
|
||||
|
||||
Reference in New Issue
Block a user