如何獲取包含數據類型的數組的區別?如何獲取編碼到數組中的特定數據類型的區別
第一陣列:
Array
(
[0] => Array
(
[ID] => 21323154
[NAME] => Name_2
[PREVIEW_TEXT] => Text_2
)
)
第二陣列:
Array
(
[0] => Array
(
[ID] => 543547564
[NAME] => Name_1
[PREVIEW_TEXT] => Text_1
)
[1] => Array
(
[ID] => 222213322
[NAME] => Name_2
[PREVIEW_TEXT] => Text_2
)
[2] => Array
(
[ID] => 333876833
[NAME] => Name_3
[PREVIEW_TEXT] => Text_3
)
)
結果應該是一個磁盤陣列:
Array
(
[0] => Array
(
[ID] => 543547564
[NAME] => Name_1
[PREVIEW_TEXT] => Text_1
)
[1] => Array
(
[ID] => 333876833
[NAME] => Name_3
[PREVIEW_TEXT] => Text_3
)
)
我嘗試了不同的選項,但它們都返回結果找到了差異,即第一個數組。
我有不同的ID
你試過['array_diff()'](http://us1.php.net/manual/en/function.array-diff.php)嗎? –
@Shankar Damodaran是的,我有一個不同的ID –
@archi_sova你想基於'NAME'而忽略'ID'嗎? – hsz