Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

compare key and one array

$array_new = [];
foreach($array_two as $key)
{
    if(array_key_exists($key, $array_one))
    {
        $array_new[$key] = $array_one[$key];
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #key #array
ADD COMMENT
Topic
Name
3+1 =