1
I’m doing an SQL query in my model and in the controller, I’m printing the values of array.
The exhibition is like this:
Array ( [campo1] => 98 [campo2] => SOLO [soma] => 1 ) Array ( [campo1] => 92 [campo2] => DARTH [soma] => 11 ).
But I would like to format like this:
[campo1] => 98 =>[campo2] =>
SOLO [soma] => 1
[campo2] => 92 =>[campo2] =>
DARTH [soma] => 11
How to do?
This is my foreach:
foreach ($variavel1 as $key) {
print_r($key);
}
Friend, put the whole method in question of your controller for better analysis
– Daniel Mendes