Source Code:
(back to article)
<?php $string = "This is a string\nwith line breaks."; $string = str_replace(["\r\n", "\r", "\n", "\t"], ' ', $string); echo $string; // Outputs: "This is a string with line breaks."
Result:
Report an issue