php find key in array
<?php
$search_array = array('first' => 1, 'second' => 4);
if (array_key_exists('first', $search_array)) {
echo "The 'first' element is in the array";
}
?>
php find key in array
<?php
$search_array = array('first' => 1, 'second' => 4);
if (array_key_exists('first', $search_array)) {
echo "The 'first' element is in the array";
}
?>
php get array key like
//your array
$arr1 = array (
"y" => 35,
"x" => 51,
"z" => 35,
"c_3" => 4,
"c_1" => 54,
"c_6" => 53,
"c_9" => 52
);
// Array with keys you want
$arr2 = array (
"c_3" => '',
"c_1" => '',
"c_6" => '',
"c_9" => ''
);
//use array_intersect_key to find the common ;)
print_r(array_intersect_key($arr1,$arr2));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us