drawmack, all,
Thanks for the replies. Sorry, I wasn't more clear. The date isn't just year, it's
Wednesday, 9/9/1999:<BR>
The number of lines after the date line is always three, but then there can be any number of sections of 3 lines after that. Can you just count up the <BR> tags, stop at 4 the first time (3 after that) and write each one out?
Also, I could be making things harder for myself, but here's the basics of what I'm doing:
-fread to get the file contents from the html file
-explode to get the file broken down by a specific <TD class=x> tag
-loop through each element of the array, strip out HTML tags except <BR> and <A>
-because the date line doesn't have a <BR> after it, use preg_replace on that string to replace : with :<BR>
This ends up giving me each array element the way I want it in terms of text, <BR>, and <A> tags positioned correctly, but the element is too big and needs to be broken down. If I break it back up into another array using the <BR>, explode strips out the <BR> tags, so I have to add them back in (using implode?) once I count them up and create the output string. I was thinking that's way too much processing for what I would think should be a quick thing. Still too new at this, maybe.
Thanks