exploding a string by line breaks accounting for cross platform

/ Published in: PHP
Save to your folder(s)

useful in conjunction with curl and examining headers

Copy this code and paste it in your HTML
  1. $retrieveResult = preg_replace('/
  2. |\r/', "\n", $retrieveResult);
  3. $retrieveResult = explode("\n", $retrieveResult);

URL: joelee.me.uk

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.