从蛋糕PHP的字符串数组中获取价值 [英] getting value from string array in cake 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();
这篇关于从蛋糕PHP的字符串数组中获取价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文