$total = array();while ($row = pg_fetch_object($sql)){$row['tipo'] = '1';$row['marca'] = '2';array_push($total, $row);}return $total;