<html><body>
<?php

/* 
Reading files.
Reading the file line by line.
Synatx: $s = fgetss($file,max_bytes_plus_1,permitted_tags)
fgetss is similar to fgets, but it removes PHP and HTML tags from the 
file unless you decide to keep some of them.

You my drop the second and third arguments when you call the function.

Here you can do without a priming read.
*/

// Reading from a file
// Try to open the file
@ $f = fopen('/home/abu-jeib/temp/abc_2.txt','rb');
if (!$f) // If u don't succeed
{
	echo "ERROR: file can't be opened.<P>\n";
	exit;
}
else // If succeeds
{
	echo "Name, Grade<P>";
	// Remove all tags except <h1>
	$s = fgetss($f,10000,"<H1>"); // Read a line (priming read)
	while (!feof($f))
	{
		echo "$s";
		$s = fgetss($f,10000,"<H1>"); // <h1> or <H1>: case insensitive
	}

	fclose($f); // close the file
}

?>
</body></html>
