Posted By

thiswayup on 10/13/10


Tagged

regex linebreaks


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

geoffreydv
bindaskhan2004hotmailcom
lifewishes


exploding a string by line breaks accounting for cross platform


 / Published in: PHP
 

URL: joelee.me.uk

useful in conjunction with curl and examining headers

  1. $retrieveResult = preg_replace('/
  2. |\r/', "\n", $retrieveResult);
  3. $retrieveResult = explode("\n", $retrieveResult);

Report this snippet  

You need to login to post a comment.