[Solved] Retrieve array_sum from while ($stmt->fetch()) result

That would do it, I think there’s quite a few ways of formatting the output.