Ver original$ar = file("archivo.txt");$total = 0;foreach($ar as $value){ list(,,$sumar) = explode(",",$value); $total += $sumar;}echo $total;