I'm trying to add some numbers in a `foreach loop` in my PHP code. I am getting a `percentage` of numbers in a `while loop` in my MySQL query for each result that I get in my PHP page.

All I need to do is to add up the final values in and show them as total.

This is how I make up the percentage in my while loop in my MySQL query:

```
$percentage = 10;
$totalWidth = $fees;

$new_width = ($percentage / 100) * $totalWidth;

```

The `$fees` value is dynamic and it is different for each result in my while loop. the code above works as it should.

Now I want to add up all the values of `$new_width`. For example: 

If one result's $new\_width is 25 and the other one is 10 and another one is 5, I need to do this: `$total = 25 + 10 + 5;`

So I tried something like this:

```
$total = 0;

foreach($new_width as $var) {
   $total = $var + $var; 
}

echo $total;

```

but the above code doesn't really make sense and it won't do anything at all.

Could someone please advise on this matter?