title: How to parse Blackberry Messenger CSV in PHP?
body: <p>I want to parse through and create a single file from CSV files generated from Blackberry Messenger. </p>
  
  <p>An example :</p>
  
  <pre><code>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
  &lt;3&lt;3=.&gt;:O :s=.&gt;=) &lt;3&lt;3=.&gt;:O :s=.&gt;=)LF
      LF
  - Copy all smiley aboveLF
  - pasteLF
  - erase 4 dotLF
  - send me backLF
  - see the magic (smiley change)LF
      CRLF
  </code></pre>
  
  <p>As you can see that CSV file has following format</p>
  
  <pre><code>Date,SendersPIN,ReceiversPIN,MessageText
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>I would consider myself beginner in PHP as far as file operations are concerned, so if possible try to describe the code.</p>
  
  <p>Thank you.</p>