so I am stuck on this for a couple of hours and i just cannot figure out how to do it.
Here is what output i want to accomplish:
if $n = 10 then we have sum ten times in a increment like this: 1+2+3+4+5+6+7+8+9+10
function summation($n) {
$start = 1;
$end = $n;
$sum = 0;
for($i = $start; $i <= $end; $i++) {
$value ="+";
echo ++$sum, $value;
}
}
summation(5);