I have an array of elements in the form of:
Array ( [0] => 16 [1] => 14 [2] => 1 [3] => 13 )
Now I need to extract only rows which ID is not one of the values in the array. Right now I'm using the following code:
$items = ArrayHelper::map(User::find()->where(['<>', 'id', $array])->all(), 'id', 'name');
Unfortunately this compares the ids in the database with just the first element of an array.
Suggestions?