<!DOCTYPE html>
<html lang="de">
<head>
   <meta charset="utf-8">
   <title>Speichern in Feld</title>
</head>
<body>
<?php
   $datei = "datei.txt";
   $feld = @file($datei, FILE_IGNORE_NEW_LINES);
   if(!$feld)
      exit("Fehler beim Lesen");

   for($i=0; $i<count($feld); $i++)
      echo "Zeile " . ($i+1) . ": $feld[$i]<br>";

   echo "<br>Anzahl Zeichen: ";
   for($i=0; $i<count($feld); $i++)
      echo mb_strlen($feld[$i]) . " ";

   echo "<br><br>Rechnen: ";
   for($i=0; $i<count($feld); $i++)
      if(is_numeric($feld[$i]))
         echo (floatval($feld[$i]) * 2) . " ";
?>
</body>
</html>