Need help parsing text file w/PHP
I'm trying to parse a plain text file, then output it's contents into an HTML table. I'm having trouble with the parsing, though. I'm familiar with the regex functions, but I can't seem to combine everything I need together.
The text file contains one or more sections like this:
Example event name
Example Location
Example date
Long description...
Each event will contain the same attributes. If an event date has NOT already passed, the event should be output to the HTML table. So, I need to read in an event, compare the date with the system date (I can figure that part out), and then output the event as separate fields if appropriate.
Can someone give me some sample code read in one event at a time and output to HTML? Thanks!
Suzanne posted this at 21:54 — 27th May 2004.
She has: 5,507 posts
Joined: Feb 2000
This is an xml file?
php.net/xml
php.net/xsl
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.