To get an array with all user IDs from the base after find() yii2?

Get all users without a ban, from the base, tell me how to get an array with only the IDs of all users.
$ids = Users::find(["baned" => $no ])
->all();

tried $ids_array = $ids['id']; is not working.
August 19th 19 at 23:28
2 answers
August 19th 19 at 23:30
Solution
$ids = Users::find(["baned" => $no ])->select("id")->asArray()->column()
Cool. I must remember that. Usually used ArrayHelper::getColumn() :) - Nat19 commented on August 19th 19 at 23:33
: )) - solon_Herman commented on August 19th 19 at 23:36
Helped, thank you. - antoinette18 commented on August 19th 19 at 23:39
August 19th 19 at 23:32
$ids = Users::find(["baned" => $no ])
->asArray()->all();

Find more questions by tags Yii