like this? Prints each line of the text file inside <P> and </P>. If this isnt what you want, plaese clarify.
<?
$textfile = "myfile.txt";
$title = "My File";
?>
<HEAD><TITLE><?=$title?></TITLE></HEAD><BODY>
<?
$file_r = file($textfile);
foreach($file_r as $line)
echo "<P>$line</P>";
?>
</BODY>