Skip to content

Instantly share code, notes, and snippets.

@dave-jay
Created June 14, 2013 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dave-jay/5780202 to your computer and use it in GitHub Desktop.
Save dave-jay/5780202 to your computer and use it in GitHub Desktop.
Remove new lines from string. Takes care for mac.
<?php
$string = preg_replace('/\r\n|\r|\n/m','',$lines);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment