📜  php 数组有键 - PHP 代码示例

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

代码示例5
 10,
    'key2' => 20,
    'key3' => 30,
    'key4' => 40,
);

if (count(array_intersect_key(array_flip($required), $data)) === count($required)) {
    // All required keys exist!
}