javascript:
function array_diff (array) { // Вычислить расхождение массивов
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
var arr_dif = [], i = 1, argc = arguments.length, argv = arguments, key, key_c, found=false;
// loop through 1st array
for ( key in array ){
// loop over other arrays
for (i = 1; i< argc; i++){
// find in the compare array
found = false;
for (key_c in argv[i]) {
if (argv[i][key_c] == array[key]) {
found = true;
break;
}
}
if(!found){
arr_dif[key] = array[key];
}
}
}
return arr_dif;
}
//Примеры:
alert ( array_diff(['Kevin', 'van', 'Zonneveld'], ['van', 'Zonneveld']) );