If I assign a 2 lines value to a variable like this.
$tt = 'part 1
part 2 ';
and I echo it.
echo $tt;
My browser will display it on 2 lines and it’s fine. But on the source page, the code will have it on 2 lines.
How can it get rid of this carriage return.
Since it’,s not a chr(13) and a \r, these don’t works.
echo str_replace(chr(13), '-', $tt);
echo str_replace('\r', '-', $tt);
Any idea?
You can try