I tried, tried and tried.
I have a mysql field (TEXT) that contains the textarea value. That is, if the text is written EXACTLY as follows:
Hello. Hello.
Hello.
Hel
lo.
Then, as it will display in the mysql field, because Im uses the wordwrap and nl2br functions when pasting there.
Now I am creating a dynamic page where the “metadata description content” is updated with the contents of “TEXT”, BUT, in one long line without any breaks or new lines.
However, I need to make the text on one line.
I used this:
str_replace ("<br/>", "", $string);
This displays the text as a single line, yes, but when viewing the source code of the page, you can see that there are gaps, for example:
<meta name="description" content="
Hello. Hello.
Hello.
Hel
lo." />
" \n" , ...
?
, , Q.
user188962