ya me fijé... es pa darme con un hacha.. TODO una comedura de coco por un puñetero trim
muchas gracias por la aportación y el tiempo
fichero.txt
uno|50
dos|20
contar.php
Código PHP:
<?
$fichero = "fichero.txt";
$abrir = file($fichero);
$total = count($abrir);
$suma_total=0;
for($i=0; $i < $total; $i++){
$suma = explode("|",$abrir[$i]);
$suma_total=$suma_total+$suma[1];
}
echo $suma_total;
?>
¡Saludos!