Answers for "php check if array key exists in another array"

PHP
14

php key in array exists

<?php
$search_array = array('first' => null, 'second' => 4);

// returns false
isset($search_array['first']);

// returns true
array_key_exists('first', $search_array);
?>
Posted by: Guest on June-07-2020
4

check if array value exists in another array php

$result = !empty(array_intersect($people, $criminals));
Posted by: Guest on April-02-2020

Code answers related to "php check if array key exists in another array"

Browse Popular Code Answers by Language