Re: Quote in input tag value?
| From: | Erik Price | Date: | Thu, 07 Feb 2002 22:02:59 +0000 |
| Subject: | Re: Quote in input tag value? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83925@lists.php.net to get a copy of this message | ||
On Thursday, February 7, 2002, at 04:54 PM, Rick Emery wrote:
I prefer: print" <input type="text" value="\"My Quote\"">"; -----Original Message----- If there is a quote mark in an input tags value what is the correct way to print the quote? <input type="text" value=""My Quote""> or <input type="text" value="\"My Quote\"">It probably doesn't really matter, but from a purist's point of view, using the (X)HTML entities is probably the best use in this case. I only suggest this because you are using double-quotes for display purposes, not for coding purposes, so it's unambiguous what you mean when you use them. To the end user it won't matter, but for another reader of your code, it may help. But again, it's probably more opinion (and if you -are- using the quotes for some obscure code, then nevermind what I just wrote). Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com