I can not wrap my head around how to do the following. I have two different lenght and different dimensional arrays that I want to combine so that the result array will have arrays1 + array2 cell that did not match.
This should help you understand what I mean
$dbquery_results1[0][] = array("1","5","b99");
$dbquery_results1[1][] = array("4","12","www");
$dbquery_results1[2][] = array("10","32","ccc");
$dbquery_results1[3][] = array("7","142","xx");
$dbquery_results2[0][] = array("c","10");
$dbquery_results2[1][] = array("as","1");
$dbquery_results2[2][] = array("fe","7");
$dbquery_combination[0][] = array("1","5","b99","as");
$dbquery_combination[1][] = array("7","142","xx","fe");
What I would like to get done
$i=0;
while(!empty($dbquery_results1[$i][0])) {
If($dbquery_results1[$i][0] == $dbquery_results2[any of the dimensions here][2])
{
$dbquery_combination[] = $dbquery_results1[$i][]+ $dbquery_results2[x-dimension][2];
} $i++;
}
So only if array1 has at [][0] same value as array2 [any dimension][1] will array1 + the array2 cell that is different be saved at array3.
Sorry that I am not too good expressing myself. Thanks a lot in advance.