RE: [PHP] Quotes in Heredoc
From: Ashim Kapoor From Ashley Sheridan The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in XHTML and will cause unexpected results. Can you elaborate on the XHTML part? Do you mean they are required in XHTML but optional in HTML ? Please keep your attribution levels straight. XHTML also requires all tags, attribute labels and values to be in lower case and values must be quoted. So your original content should be table cellpadding=0 cellspacing=0 border=0 align=center width=621 tr td rowspan=2img width=15 height=1 src=../images/spacer.gif/td You should install the HTML Validtor plug-in for Firefox and use it regularly to catch all of the errors you can. Some of this can also be replaced with style sheets. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quotes in Heredoc
At 8:23 AM -0500 2/28/11, Bob McConnell wrote: From: Ashim Kapoor From Ashley Sheridan The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in XHTML and will cause unexpected results. Can you elaborate on the XHTML part? Do you mean they are required in XHTML but optional in HTML ? Please keep your attribution levels straight. XHTML also requires all tags, attribute labels and values to be in lower case and values must be quoted. So your original content should be table cellpadding=0 cellspacing=0 border=0 align=center width=621 tr td rowspan=2img width=15 height=1 src=../images/spacer.gif/td You should install the HTML Validtor plug-in for Firefox and use it regularly to catch all of the errors you can. Some of this can also be replaced with style sheets. Bob McConnell In addition to what Bob wrote, do yourself a favor and use css to more style declarations (cellpadding, border, align) to a css file. That's much easier to maintain. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quotes in Heredoc
Dear All, I am learning PHP by reading a book. My query pertains to the following lines : - $form_str = EOFORMSTR TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=CENTER WIDTH=621 TR TD ROWSPAN=2IMG WIDTH=15 HEIGHT=1 SRC=../images/spacer.gif/TD . My query is that is it true that we don't need to do TABLE ... ALIGN=CENTER ... ie. we don't need to quote the value of the options in Heredoc. Is that correct? Many thanks, Ashim.
Re: [PHP] Quotes in Heredoc
On Sat, 2011-02-26 at 14:41 +0530, Ashim Kapoor wrote: Dear All, I am learning PHP by reading a book. My query pertains to the following lines : - $form_str = EOFORMSTR TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=CENTER WIDTH=621 TR TD ROWSPAN=2IMG WIDTH=15 HEIGHT=1 SRC=../images/spacer.gif/TD . My query is that is it true that we don't need to do TABLE ... ALIGN=CENTER ... ie. we don't need to quote the value of the options in Heredoc. Is that correct? Many thanks, Ashim. The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in XHTML and will cause unexpected results. The only difference Heredoc makes in PHP is that the strings you write don't require characters to be escaped, which you would have to do normally in traditional quoted strings. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Quotes in Heredoc
The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in XHTML and will cause unexpected results. Can you elaborate on the XHTML part? Do you mean they are required in XHTML but optional in HTML ? Many thanks, Ashim.
Re: [PHP] Quotes in Heredoc
On Sat, 2011-02-26 at 16:27 +0530, Ashim Kapoor wrote: The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in XHTML and will cause unexpected results. Can you elaborate on the XHTML part? Do you mean they are required in XHTML but optional in HTML ? Many thanks, Ashim. Yes, in HTML the quotes are optional, but they are required in XHTML documents: http://www.w3.org/TR/xhtml1/diffs.html#h-4.4 Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Quotes in Heredoc
Yes, in HTML the quotes are optional, but they are required in XHTML documents: http://www.w3.org/TR/xhtml1/diffs.html#h-4.4 Ok Thank you, Ashim