Source Code:
(back to article)
<?php $string = "This is a string\r\nwith new lines\n"; $string = preg_replace("/\r?\n/", " ", $string); echo $string; // Outputs: "This is a string with new lines "
Result:
Report an issue