|
Posted by nescio on 11/04/05 16:45
hello,
i have two array's, lets say:
$inhoudDir = array('a','b','c','d','e','f','g','x','y','z');
$inhoudDb = array('a','b','c','x','z');
now i want to compare the two and put the elements that are only in
$inhoudDir in a new array: $geenDuplicaten;
i have tried things like:
for($cc = 0; $cc < sizeof($inhoudDir); $cc++){
for($dd = 0; $dd < sizeof($inhoudDb); $dd++){
if($inhoudDir[$cc] != $inhoudDb[$dd]){
$geenDuplicaten[] = $inhoudDir[$cc];
}
}
}
but it doesnot work: the array $geenDuplicaten should contain: d,e,f,g,y
but i do not know how to do this;
thanks
[Back to original message]
|