03-26-2016, 09:57 AM
Hello , I would like to compare 2 arrays together . is in the first array
first_array ( 0 ) = "green"
first_array ( 1 ) = "green"
first_array (2) = "red"
first_array ( 3 ) = "yellow"
the 2 array contains e.g.
second_array ( 0 ) = "yellow"
second_array (1) = "red"
second_array (2) = "red"
second_array ( 3 ) = "yellow"
The result should be as follows .
0 = for no coincidence
1 = for color in second array but not in the right place
2 = right color and in the correct place .
who can help.
lorglas
first_array ( 0 ) = "green"
first_array ( 1 ) = "green"
first_array (2) = "red"
first_array ( 3 ) = "yellow"
the 2 array contains e.g.
second_array ( 0 ) = "yellow"
second_array (1) = "red"
second_array (2) = "red"
second_array ( 3 ) = "yellow"
The result should be as follows .
0 = for no coincidence
1 = for color in second array but not in the right place
2 = right color and in the correct place .
who can help.
lorglas