I am essentially trying to compare Array1, with Array2, to find matching rows. However, both arrays have around 14000 rows (from sql table), so I figured it would be logical to delete matching rows in array2 once found, to reduce the number of iterations overall.
It looks something like this:
foreach($array1 as $arrayRow){
foreach($array2 as $array2Row){
if($arrayRow['ID'] == $array2Row['ID']{
$matchfound = 1;
unset($array2,$array2Row);
}
}
}
However seemingly, nothing happens at all when running the above code.
Note: The data for array 1 and 2 come from two separate databases, and I am unable to run a query on both at once (hence having to do this in php)