I want to parse through and create a single file from CSV files generated from Blackberry Messenger.
An example :
BlackBerry Messenger,6.0.0.129CRLF
201112071323251405361,"2732E6DB ","555ABCDA",TextData TextData TextData TextDataCRLF
201112071323253558103,"555ABCDA","2732E6DB ",TextData TextData TextDataCRLF
201112071323253746576,"2732E6DB ","555ABCDA",TextData TextData TextData
LF
TextData TextDataLF
TextData TextData TextData TextData TextData TextData TextData TextData TextDataLF
TextData TextData TextData TextDataCRLF
201112071323253809444,"2732E6DB ","555ABCDA", TextData TextData TextData TextDataCRLF
201112091323441592335,"2732E6DB ","555ABCDA", TextData TextDataLF
LF
<3<3=.>:O :s=.>=) <3<3=.>:O :s=.>=)LF
LF
- Copy all smiley aboveLF
- pasteLF
- erase 4 dotLF
- send me backLF
- see the magic (smiley change)LF
CRLF
As you can see that CSV file has following format
Date,SendersPIN,ReceiversPIN,MessageText
Date is in YYYYMMDD+epoch format. Every record ends with a CRLF (carriage return line feed) characters, while each new line in MessageText is separated by LF (line feed) character.
As you can see the problem is that MessageText is not contained in any container and it may have many new lines. So I cant import it in excel directly.
I would consider myself beginner in PHP as far as file operations are concerned, so if possible try to describe the code.
Thank you.