On 12 September 2003 11:50, Ford, Mike [LSS] wrote: > On 11 September 2003 19:56, CPT John W. Holmes wrote: > > > From: "murugesan" <[EMAIL PROTECTED]> > > > > > > > This will help you > > > > > > <?php > > > $dins="Dinesh"; > > > echo "<input type=text name=dins class='textbox' value='$dins' > > > >"; > > > > > > > > Use double quotes for HTML attributes. > > Why? Both the HTML 4.01 and XHTML 1.0 (via XML 1.0) > specifications explicitly allow both single and double quotes for > attribute values.
OK, I've now seen the other followups requesting backup for this, so: HTML 4.01: At http://www.w3.org/TR/html401/intro/sgmltut.html#h-3.2.2, the spec says: "By default, SGML requires that all attribute values be delimited using either double quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39)." XHTML 1.0 relies on the XML 1.0 spec for this, and the XML 1.0 spec, at http://www.w3.org/TR/2000/REC-xml-20001006#NT-AttValue, defines an attribute value thusly: AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" Hope this helps! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php