php how can i get certain keywords form a text file?
<p>So after several Advil's I think I need help</p>

<p>I am trying to make a script that lets the user upload a .txt file, the file will look like this as an example</p>

<pre><code>           EXT. DUNKIN' DONUTS - DAY

           Police vehicles remain in the parking lot.  The determined
           female reporter from the courthouse steps, MELINDA FUENTES
           (32), interviews Comandante Chitt, who holds a napkin to his
           jaw, like he cut himself shaving.

                               MELINDA
                     &lt; Comandante Chitt, how does it
                     feel to get shot in the face? &gt;

                               COMANDANTE CHITT
                     &lt; Not too different than getting
                     shot in the arm or leg. &gt;

                               MELINDA
                     &lt; Tell us what happened. &gt;

                               COMANDANTE CHITT
                     &lt; I parked my car.
                         (indicates assault vehicle
                          in donut shop)
                     He aimed his weapon at my head.  I
                     fired seven shots. He stopped
                     aiming his weapon at my head. &gt;

           Melinda waits for more, but Chitt turns and walks away into
           the roped-off crime scene. Melinda is confused for a second,
           then resumes smiling.

                               MELINDA
                     &lt; And there you have it... A man of
                     few words. &gt;
</code></pre>

<p>Ok, so based off of this what I want to do is this:</p>

<p>The PHP script looks at the file and counts 35 white spaces, since all files will have the same layout and never differ in white spaces I chose this as the best way to go.</p>

<p>for every 35 white spaces extract character 36 until the end of line.</p>

<p>Then tally up $character++</p>

<p>so in the end the output would look like</p>

<hr>

<p>It looks like you have 2 characters in your script</p>

<p>Melinda</p>

<h2>Commandante Chitt</h2>

<p>using PHP to select distint names, and use the strtolower() to lower case the strings and ucfirst() to make the first letter upper-case</p>

<p>thats my project,</p>

<p>I'm at the stage where I'm going crazy trying to figure out how to count white-spaces and everything after that white space until the first white-space after the word IS a character name </p>
