Even more reliable :



function arraycomp($a1, $a2, optional $m)
    dim $s
    for each $n in $a2
        if (ascan($a1,$n)>-1 and $m) or (ascan($a1,$n)=-1 and 0=$m) $s=$s+'~~~'+$n endif
    next
    $arraycomp = split( substr($s,4,len($s)), '~~~' )
endfunction



(Just to avoid splitting elements like " f" )

J.
_________________________