Skip to content

Instantly share code, notes, and snippets.

@dave-jay
Created June 14, 2013 07:54
Show Gist options
  • 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