Help with Flat text file.

From: Date: Wed, 01 Nov 2000 17:56:39 +0000
Subject: Help with Flat text file.
Groups: php.general 
Request: Send a blank email to php-general+get-23198@lists.php.net to get a copy of this message
Hello everyone. (I am not sure if this post is appropriate.) 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 lawrence@imigis.com with any information. Thanks!! Lawrence Ng

« previous php.general (#23198) next »