Problem Description
$string = "
put returns between paragraphs
for linebreak add 2 spaces at end
";
Want to remove all new lines from string.
I've this regex, it can catch all of them, the problem is I don't know with which function should I use it.
/\r\n|\r|\n/
`$string` should become:
$string = "put returns between paragraphs for linebreak add 2 spaces at end ";
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?