从蛋糕PHP的字符串数组中获取价值

从蛋糕PHP的字符串数组中获取价值

问题描述:

如果我有以下数组输出:

If I have this output of an array :

$array_to_delete =
[ 
    (int) 3 => (int) 4,
    (int) 4 => (int) 5 
]

我想得到4和5,依此类推条件,例如:

And i want to get 4 and 5 and so on at where condition , Like that :

 $warehouseItemsData = $this->WarehouseEmployers->WarehouseItems->find()
    ->where(['id', $array_to_delete])
    ->all();

我该怎么做?在蛋糕php中

How can i do that ? in cake php

使用IN

$warehouseItemsData = $this->WarehouseEmployers->WarehouseItems->find()
    ->where(['id IN', $array_to_delete])
    ->all();