update : 2015.11.03
php.shukuma.com검색:
|
array_diff_key(PHP 5 >= 5.1.0, PHP 7) array_diff_key — Computes the difference of arrays using keys for comparison 설명
array array_diff_key
( array
$array1
, array $array2
[, array $...
] )
Compares the keys from 인수
반환값
Returns an array containing all the entries from
예제
Example #1 array_diff_key() example The two keys from the key => value pairs are considered equal only if (string) $key1 === (string) $key2 . In other words a strict type check is executed so the string representation must be the same.
<?php 위 예제의 출력: array(2) { ["red"]=> int(2) ["purple"]=> int(4) } 주의
참고
|