★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.array-diff.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Arrays
Quick Reference
English version of this pageHungarian version of this page
Arrays
* array
* array_count_values
* array_diff
* array_flip
* array_intersect
* array_keys
* array_merge
* array_merge_recursive
* array_multisort
* array_pad
* array_pop
* array_push
* array_rand
* array_reverse
* array_shift
* array_slice
* array_splice
* array_unshift
* array_values
* array_walk
* arsort
* asort
* compact
* count
* current
* each
* end
* extract
* in_array
* key
* krsort
* ksort
* list
* next
* pos
* prev
* range
* reset
* rsort
* shuffle
* sizeof
* sort
* uasort
* uksort
* usort
Manual: array_diff
View the source code for this pageSearch the site



Previous page
 array_count_values
 Updated
Sat, 12 Aug 2000
array_flip 
Next page


array_diff

(PHP4 >= 4.0.1)

array_diff -- 配列の差を計算する

説明

array array_diff (array array1, array array2 [, array ...])

array_diff() は、他の引数のいずれにも存在しな いarray1の値の全てを有する配列を返します。 キーと値の関係は維持されることに注意して下さい。

例 1. array_diff() の例


$array1 = array ("a" => "green", "red", "blue");
$array2 = array ("b" => "green", "yellow", "red");
$result = array_diff ($array1, $array2);
      

これにより、$resultarray ("blue"); となります。

array_intersect()も参照下さい。


 About Notes


Previous page
 array_count_values
 Updated
Sat, 12 Aug 2000
array_flip 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.