$arrs=Brand::find()->orderBy('order')->select('name')->asArray()->all();
结果为:
Array (
[0] => Array (
[name] => php
)
[1] => Array (
[name] => asp
)
[2] => Array (
[name] => jsp
)
)
那怎么取出这样的格式或转换出来
Array (
[1] => php
[2] => asp
[3] => jsp
)
\yii\helpers\ArrayHelper::getColumn(Brand::find()->orderBy('order')->select('name')->asArray()->all(), 'name')