📌  相关文章
📜  通过匹配值从另一个数组中获取键 - 无论代码示例

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

代码示例1
 "green", "red", "blue");
  $array2 = array("b" => "green", "yellow", "red");
  $result = array_intersect($array1, $array2);
  print_r($result);
?>

#output
Array
(
    [a] => green
    [0] => red
)