Hi guys!
I am reading two csv files into 2 multidimensional arrays (5 named columns for each file - so each element in each array consists of 5 named values).
Afterwards I want two compare whether an element in column 1 (1. Array $test)
is identical with an element in column 1 (2. Array $wert).
If this is the case, different elements of both arrays should be assigned to a new array ($Mxsing).
At the moment a for-loop is comparing each element of array 1 ($i) with each element of array 2 ($e).
This is naturally a performance killer.
I need more than a hint please.
Thx
Daniel
$labels=0;
for ($e=0; $e < $rowcode; $e++)
{
if ( $test[0][$i][Variablename] ==$wert[0][$e][Variablename] )
{ $labels++;
$Mxsing[$mxgruppe][label][$labels] = preg_replace ( '/<br>/' ,' ' , $wert[0][$e][Wertelabel]) ;
$Mxsing[$mxgruppe][wert][$labels]=$wert[0][$e][Codevalue];
$Mxsing[$mxgruppe][codemax] = $labels;
}
}