Source Code:
(back to article)
<?php $string = "Hello\r\n world!"; $clean_string = str_replace(["\r", "\n"], '', $string); echo $clean_string; // Outputs: "Hello world!"
Result:
Report an issue