Posts by Lucas Padilha • 95 points
3 posts
-
2
votes1
answer395
viewsQ: Split two-dimensional array into 2 simple arrays - PHP
I am making adaptations in an old system and need to create a new routine to split a two-dimensional array into 2 simple arrays. Let’s say the variable $query get the array below: $query =…
-
1
votes3
answers5927
viewsA: Group values from an array in PHP
I performed some tests and managed to solve my problem. Here is the code I used: $nova = []; foreach($origial as $a) { if (!isset($nova[$a['prg_cod_barra']])) { $nova[$a['prg_cod_barra']] = $a; }…
-
6
votes3
answers5927
viewsQ: Group values from an array in PHP
I have a grid form that returns the following values within an Array: array (size=3) 0 => array (size=5) 'pei_seq' => int 0 'prg_cod_barra' => string '7899619704729' (length=13)…