fgetss() strips all HTML and PHP tags from the file: string fgetss (int filepointer, int length [, string allowable_tags])
<?
$fh = fopen("data.txt", "r");
while (!feof($fh)) :
print fgetss($fh, 2048);
endwhile;
fclose($fh);
?>
Related examples in the same category