I have 2 arrays of data that i want to compare and remove duplicates. I have a MasterArray and a CompareArray. I want to remove all Duplicates in MasterArray. I kind of have this working but its currently case sensitive, which I need to remove. This is where I am struggling.
"Item C" and "e" should not be in the list as it equal if it was not case sensitive.
$MasterArray = array("Item A", "ITEM B", "ITEM C", "d", "E");
$CompareArray = array("Item A", "B", "item c", "d", "e");
$UniqueArray = array_unique( array_merge($MasterArray, $CompareArray) );
$MasterArray = array_diff($UniqueArray, $MasterArray);
print_r($MasterArray); exit;