I know the nl2br() PHP function. I have been programming in PHP for almost 7 years now.
Perhaps I need to explain it this way. What I'm trying to do is make where my HTML, when outputted by the PHP script, looks like this when you view the source:
Code:
<blockquote>
<p>Hello, World!</p>
</blockquote>
Instead of like this when you view the source:
Code:
<blockquote><p>Hello, World!</p></blockquote>
Every time I put in \n, \r, or any combination of the two it just outputs the \n and/or \r as text to the browser.
The PHP script on
test.php has the following line of code:
Code:
echo '<blockquote>\n <p>One</p>\n </blockquote>\n';
When you view the source of the page in the browser, it looks like this:
Code:
<blockquote>\n<p>One</p>\n</blockquote>\n
In addition, PHP functions like explode() and str_replace() don't even see the \n or \r in the strings passed to them and implode() just places the strings together with the \n and/or \r outputted to the browser as text.