Question: will the substitution for the variable $dins occur if surrounded by single 
quotes?

I could be mixing languages here, but I seem to recall a rule in one language about 
substituting variable contents only occurring between double quotes.

Warren Vail

-----Original Message-----
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 5:03 PM
To: Jim Lucas
Cc: murugesan; Golawala, Moiz M (IndSys, GE Interlogix);
[EMAIL PROTECTED]
Subject: Re: [PHP] Problem with HTML Text box and PHP variable.


Jim Lucas wrote:

 >>><?php
 >>> $dins="Dinesh";
 >>> echo "<input type=text name=dins class='textbox' value='$dins' >";
 >>>?>
 >>
 >>Use double quotes for HTML attributes.
 >
> Why do you say that?

Yeah, I figured someone would ask that. :) I couldn't find anything 
definitive on w3c.org; can someone back me up?

AFAIK, they are required in XML and XHTML. It's a good habit to get into 
with regular HTML, also (although, yes, both will work in HTML).

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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

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

Reply via email to