Re: [PHP] Mining a file for data

2003-03-08 Thread Hugh Danaher
John, I reread your post, and spent a bit of time to rewrite my last post. This should be more appropriate for your needs. you'll need to add a few lines yourself to complete it. Let me know if it works. hugh "; $temp=fgets($fp,100); $card_color=trim(preg_replace("Card Color:","",$temp)); ech

Re: [PHP] Mining a file for data

2003-03-08 Thread John Wulff
I've toyed with this for a few hours now with no luck. I think the best way to go about extracting the data is to look for the field names and seperate the fields by them. Any more hints on how to do this? The file structure is as shown below. Card Name: Akroma, Angel of Wrath Card Color: W Man

Re: [PHP] Mining a file for data

2003-03-08 Thread Ernest E Vogelsinger
Dear Hugh, please don't use background colors. Black text on darkblue background is definetely hard to decipher. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] Mining a file for data

2003-03-07 Thread Hugh Danaher
depending on how the text file is organized, this can be an easy task or impossible. But, here goes: If a line in the text file contains all the info about the card and is organized routinely and separated by a special character ("," , ; or tab, then you should be able to do something like the fo