coloco asi el codigo y solo imprime puros 111111
Código PHP:
<?php
$arreglo=file("test.txt");
foreach($arreglo as $value){
if(empty($value)){
echo "vacio";
}else{
$inter=count($value);
print $inter;
}
}
?>
test.txt tiene las siguientes lineas
hola1
hola2
hola4
hola5
hola7