Re: two ?s: '' vs ""; function to post form data
| From: | Matt McClanahan | Date: | Wed, 18 Oct 2000 03:21:23 +0000 |
| Subject: | Re: two ?s: '' vs ""; function to post form data | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20773@lists.php.net to get a copy of this message | ||
On Tue, 17 Oct 2000, Daniel Convissor wrote:
> Hey Alan:
>
> > 1. I've been reading a few php articles today, and so far I've not come
> > across a clear distinction between variables defined using '' and those
> > using "". I've read those are both strings, but what is the difference?
>
> "It's partly style, but" single quotes don't need escaping
> 'It\'s partly style, but' single quotes in text need escaping
Another important distinction is that strings in single quotes won't be
parsed, so 'Hello, $name' will be read literally as 'Hello, $name' as
opposed to 'Hello, John'.
Matt