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="&quotMy Quote&quot">
> 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 Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to