Php – Append associatve elements to each row while looping a mysqli query result
I am using the following code to generate additional data for each row of my query result set. while ($row = $table->fetch_array()) { $formula = [ 'tkoSum' => $this->getTkoSum($row['id']), 'chko' => $this->getChko($row['id']) ]; $containers[] = ['info' => $row, 'formula' =>…