foreach veya while ile döngüye alın ve değişkene atayın gelen değişkenlerin hepsini şu şekilde toplayabilirsiniz.
$toplam += $degisken;
echo $toplam;