Hi,
I am using this DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
So when I use the code below:
I get <br /> inserted instead of <br>
This causes me to warnings in my validation:
Reading the manual it seems that I should
insert a "false" parameter like this:
But when I do this I get a php error:
Wrong parameter count for nl2br() in /home/guru54gt5/public_html/im/expert_disp.php on line 30
I am using php 5.2
So what did I mis-understand ?
I am using this DOCTYPE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
So when I use the code below:
PHP Code:
$D_blog = nl2br($m_blog);
This causes me to warnings in my validation:
Line 95, Column 5: NET-enabling start-tag requires SHORTTAG YES
<br />
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
<br />
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
insert a "false" parameter like this:
PHP Code:
$D_blog= nl2br("$m_blog", false);
Wrong parameter count for nl2br() in /home/guru54gt5/public_html/im/expert_disp.php on line 30
I am using php 5.2
So what did I mis-understand ?
Comment