📅  最后修改于: 2022-03-11 14:57:26.305000             🧑  作者: Mango
function myfunction($products, $field, $value)
{
foreach($products as $key => $product)
{
if ( $product[$field] === $value )
return $key;
}
return false;
}