Re: Re: PHP html layout
| From: | Terry Romine | Date: | Mon, 16 Sep 2002 12:56:46 +0000 |
| Subject: | Re: Re: PHP html layout | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21770@lists.php.net to get a copy of this message | ||
not quite:
double quotes expand variables and single quotes do not.
so:
$title = "Here is my domain"; echo('<a href="my_domain.com">$title</a> ');
results in:
$title
whereas:
$title = "Here is my domain"; echo("<a href='my_domain.com'>$title</a>");
results in:
Here is my domain
it's a not so minor point when you have to convert html from an app that defaults to double quotes to either single quotes or escaped quotes to embed inside your php coding.
Terry
On Monday, September 16, 2002, at 12:08 AM, victor wrote:
Or: <?php echo '<a href"blah.htm">blah</a>'; /* note the different quotations and their use. The yc an be interchangeable, this way will save u a ton on backslashing every double quote. */ ?> - Victor > www.argilent.com