php input file line by line make first line header one tag
<pre><code>    &lt;?php

foreach (glob("POSTS/*.txt") as $filename) 
        {       

            $file = fopen($filename, 'r') or exit("Unable to open file!");
            //Output a line of the file until the end is reached


                echo date('D, M jS, Y H:i a', filemtime($filename))."&lt;br&gt;";
                while(!feof($file))
                  {
                  echo fgets($file). "&lt;br&gt;";
                  }
            echo "&lt;hr/&gt;";
        }
    fclose($file);



    ?&gt;
</code></pre>

<p>so this php code reads from a folder all the files and each file line by line, i want it so that the file when being read will: for the first line add an html tag to make the first line a big heading and the next lines normal? how do i do this, thanks</p>
