Re: [PHP] Back to Basics - Why Use Single Quotes?
- From: eric.butera@xxxxxxxxx ("Eric Butera")
- Date: Thu, 31 Jul 2008 08:54:40 -0400
On Wed, Jul 30, 2008 at 6:51 PM, Stephen <stephen-d@xxxxxxxxxx> wrote:
I have traditionally used double quotes going back to my PASCAL days.
I see many PHP examples using single quotes, and I began to adopt that
convention.
Even updating existing code.
And I broke some stuff that was doing variable expansion. So I am back to
using double quotes.
But I wonder, is there any reason to use single quotes?
Stephen
Because sometimes it is nice to do this:
$onclick = ' onclick="..."'
Not having to escape my single tick makes it more readable.
.
- References:
- Back to Basics - Why Use Single Quotes?
- From: Stephen
- Back to Basics - Why Use Single Quotes?
- Prev by Date: Re: [PHP] Using $_GET for POST
- Next by Date: Re: [PHP] Back to Basics - Why Use Single Quotes?
- Previous by thread: Re: [PHP] Back to Basics - Why Use Single Quotes?
- Next by thread: Get Remote-Image
- Index(es):
Relevant Pages
|