// text while (1) { $buffer = fgets($fp); if ($buffer == '=====' || feof($fp)) break; $text .= $buffer . '
'; } echo '' . $text . ''; echo '';