-4
Array
(
[0] => Array
(
[0] => DDF
[2] => 00001778BRASILIA
[25] => 00032433NORTE (AGUAS CLARAS)
[44] => 00000000
[68] => RUA
[102] => 00655588MANACA
[124] => R MANACA
[145] => 71907270NS
[179] =>
)
[1] => Array
(
[0] => DDF
[2] => 00001778BRASILIA
[25] => 00052443RESIDENCIAL FLAMBOYANT (PLANALTINA)
[39] => 00000000
[63] => CONJUNTO
[96] => 00742211A
[119] => CJ A
[141] => 73366243NS
[142] =>
)
[2] => Array
(
[0] => DDF
[2] => 00001778BRASILIA
[25] => 00032434SUL (AGUAS CLARAS)
[44] => 00000000
[68] => RUA
[102] => 00575809MANACA
[124] => R MANACA
[145] => 71936500NS
)
)
Expected result
Array(
[0] => Array
(
['cidade'] => BRASILIA
['bairro'] =>NORTE (AGUAS CLARAS)
['logradouro'] => RUA MANACA
['cep'] =>71907270
)
)
The array comes from where? it is possible to rename keys in the setting?
– rray
the array comes from a txt file, result obtained with that echo code "<pre>"; print_r($narr); echo "</pre>";
– Humberto Lopes
What is the relation of the first as the second array? What is the criterion for using the information? What you asked, can be answered with: $array2[$indicey] = $array1[$indicex]. Explain your problem better.
– mau humor
I developed the solution for you, but I noticed that Indice 68 and 102 are not repeated in all array. So this generated an error in the routine I did, but if you want I put here for you and you handle the exceptions of the indexes.
– Duque
can post Duke...
– Humberto Lopes