Help with Flat Text file.

wxdqz

New Member
Hello everyone.

I was wondering if anyone can help me.

I have the following flat text file and need to parse out the results.

Keyword:1:3:mp3:Owner:1:9:anewshopp:Title:1:40:anewShop.com's MP3 Player Shopping Guide:
Keyword:2:3:mp3:Owner:2:7:readyja:Title:2:54:Faster MP3 Downloads Now! Go!Zilla - a free download.:
Keyword:3:3:MP3:Owner:3:6:seline:Title:3:72:Pianists Raul Di Blasio, Giovanni Marradi, Yanni, more. New Age, Latin.:
Keyword:4:3:mp3:Owner:4:10:rockenroll:Title:4:14:RockenRoll.com:

The first field is the field value,
second field is the row number, third field is the number of characters in the fourth field, and the fourth field is an actual value.

The next four repeat the same pattern.

I currently have a parser that separates each row into an array using the colon and I run into problems when there is a colon in the fields. Is there a php function to read this type of text file?

I was told that this is a common format.

Any help would be appreciated.

Please contact <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> with any information.

Thanks!!
 
Back
Top