I have an array in php and I need to get the values together so I can put them in a table> phtml
Follow jsonArray You will always have these five types of transportation.
I could not do much to leave here what has already been done, the only thing I have is
public function relatorio($dtInicio, $dtFinal) {
$dbControleVeiculos = new \Db\Fisc\ControleVeiculos();
$original = iterator_to_array($dbControleVeiculos->getResumoControleVeiculos($dtInicio, $dtFinal));
$result = array();
foreach ($original as $data) {
$id = $data['nome'];
if (isset($result[$id])) {
$result[$id][] = $data;
} else {
$result[$id] = array($data);
}
}
return $result;
// return
}
My goal is to stay that way.