$sum = 0;
while (isset($sum)) { if (!empty($sum)) { $total += $sum; } else { break; } }
return $total;