3
I need to mount an array with all the data coming from another array using preg_match_all,I’m using the following code.
$results = array(
'nome;26484865464864;ruadarua;desmontagem;sim;matogrosso;liberado',
'fulanodetal;26469865464865;avenidadocentro;desmontagem;sim;matogrosso;liberado',
'ciclano;26464065464866;ruasaojosegenonimo;desmontagem;sim;matogrosso;liberado'
);
foreach ($results as $value) {
$cnpj_desmontagem[] = preg_match_all('/(\d{14})/', $value, $cnpj_desmontagem);
}
var_dump($cnpj_desmontagem);
But it is overriding the other values instead of mounting an array with all the data collected
Isn’t that the way out? https://ideone.com/eZ6KbV
– rray
no, if I stop the forech in the middle with a die it shows me the other values, the problem is that the assigned values are overlapping instead of mounting the array.
– Marcos Seixas