📜  获取值数组的键 php 代码示例

📅  最后修改于: 2022-03-11 14:54:11.807000             🧑  作者: Mango

代码示例2
$people = array(
  2 => array(
    'name' => 'John',
    'fav_color' => 'green'
  ),
  5=> array(
    'name' => 'Samuel',
    'fav_color' => 'blue'
  ));
$found_key = array_search('blue', array_column($people, 'fav_color'));