I'm just learning PHP so please excuse my ignorance. I'm trying to extract the data from a simply formatted text file via a simple PHP script. The goal of this project is to take Magic the Gathering spoiler lists and dump them into a MySQL database. I've got plenty of experience with MySQL but not file parsing. How do I about parsing this data? What sort of pattern recognition do I use (if that's the right term). Thanks for the help. The format of the file is below. -John
Card Name: Akroma, Angel of Wrath Card Color: W Mana Cost: 5WWW Type & Class: Creature - Angel Legend Pow/Tou: 6/6 Card Text: Flying, first strike, trample, haste, protection from black, protection from red. Attacking doesn't cause Akroma, Angel of Wrath to tap. Flavor Text: No rest. No mercy. No matter what. Artist: Ron Spears Rarity: R Card #: 1/145 Card Name: Akroma's Devoted Card Color: W Mana Cost: 3W Type & Class: Creature - Cleric Pow/Tou: 2/4 Card Text: Attacking doesn't cause Clerics to tap. Flavor Text: "Akroma asked for only one thing from her troops: unwavering, unconditional loyalty." Artist: Dave Dorman Rarity: U Card #: 2/145 etc.. etc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php