PHP .txt file search w/display of related search info
<p>I have a text file that contains a years worth of dates with associated dates. I am working with the file from 2009 but its structure is the same in the 2011 file, and will be in the 2012 file. As you can see each date section starts with a 1 and a space followed by a date in mmddyy format:</p>

<pre><code>1 070109  
 MON JUN 29........ THU JUL 09  
 TUE JUN 30........ MON JUL 13  
 WED JUL 01........ MON JUL 13  
 THU JUL 02........ TUE JUL 14  
 FRI JUL 03........ TUE JUL 14  
        CIVIL TRAFFIC  
 MON JUN 29........ WED JUL 29  
 TUE JUN 30........ THU JUL 30  
 WED JUL 01........ FRI JUL 31  
 THU JUL 02........ MON AUG 03  
 FRI JUL 03........ MON AUG 03  

1 070209  
 TUE JUN 30........ MON JUL 13  
 WED JUL 01........ MON JUL 13  
 THU JUL 02........ TUE JUL 14  
 FRI JUL 03........ TUE JUL 14  
 SAT JUL 04........ WED JUL 15  
        CIVIL TRAFFIC  
 TUE JUN 30........ THU JUL 30  
 WED JUL 01........ FRI JUL 31  
 THU JUL 02........ MON AUG 03  
 FRI JUL 03........ MON AUG 03  
 SAT JUL 04........ TUE AUG 04  
</code></pre>

<p>What I need to be able to do is retrieve the associated dates listed below each heading date.  I want it set up so if the user just wants the dates for 070109, they could just select the button for "Todays Court Dates".  If they need court dates for a different date, they would enter the date they want, the text file would be searched for "1 $date" and the associated information would be retrieved and displayed.  There's my problem...</p>

<p>I have been able to read the file and even diplay the entire file, but I have not figured out how to locate the "1 070109" and then display only the following 12 lines of information</p>
