$a1 = array('A', 'A', 'A', 'A', 'B', 'C');
$a2 = array('A', 'A', 'A', 'A', 'B', 'C');
I want to match the first 'A' in $a1 with the last 'A' in $a2. And the second 'A' in $a1 with the second-from-last 'A' in $a2.
$a1 with $a2, like so:
0 => 'A' with 3 => 'A'
1 => 'A' with 2 => 'A'
2 => 'A' with 1 => 'A'
3 => 'A' with 0 => 'A'
I need an if statement to determine if there is another instance of 'A' in $a1 to match it with its respective value in $a2
1 Answer