$i = 9;
while($i <= 40){
$summa = $i += 1;
echo $summa."<br />";
$i++;
}
$i = 9;
while($i <= 40){
$summa[] = $i += 1;
$i++;
}
echo implode(' + ',$summa).' = '.array_sum($summa);
10 + 12 + 14 + 16 + 18 + 20 + 22 + 24 + 26 + 28 + 30 + 32 + 34 + 36 + 38 + 40 = 400