1
Good evening, I have two Arrays:
$array1 = (
[0] => Array ("Nome":"Rodrigo","CPF":"123456789-00","Cargo":"Abestado")
[1] => Array ("Nome":"Maria","CPF":"987654321-00","Cargo":"Abestada")
$array2 = (
[0] => Array ("CPF":"123456789-00","Titulo de Eleitor":"456789123")
[1] => Array ("CPF":"987654321-00","Titulo de Eleitor":"987564123")
In these arrays I have many records. What I want to know is if you can do a CPF query between the arrays. So I look for CPF from $array1 = CPF from $array2. When the result is TRUE, I want the data that differs between arrays to be embedded in $array3 like this:
$array3 = (
[0] => Array ("Nome":"Rodrigo","CPF":"123456789-00","Cargo":"Abestado","Titulo de Eleitor":"987564123")
[1] => Array ("Nome":"Maria","CPF":"987654321-00","Cargo":"Abestada","Titulo de Eleitor":"987564123")
That’s possible?
Thanks for your help
Great answer to you! I improved the performance of my code thanks to your answer. =)
– Andrei Coelho
@Andreicoelho Good :). In fact now it was much better, saving previously the transformation in columns not to have to do at each step.
– Isac
Perfect Isac! Exactly that!
– Andrei Coelho
Simply Perfect man. Thank you Isac
– Rodrigo Pereira de Freitas
Andrei, only unfortunately you can not check the two answers. Because it is clear that the Isac response was an improvement of yours. Thank you for your time.
– Rodrigo Pereira de Freitas
@Rodrigopereiradefreitas tranquil! I also found the answer of Isac better. =)
– Andrei Coelho