RE: [PHP] Single Quote vs. Double Quote..

From: Date: Thu, 31 Aug 2000 04:10:53 +0000
Subject: RE: [PHP] Single Quote vs. Double Quote..
Groups: php.general 
Request: Send a blank email to php-general+get-14515@lists.php.net to get a copy of this message
Thanks, but isn't it easier to do this in "B)" ? echo '<img src="image.jpg">\n'; It is same, but with the possibility to cut&paste HTML from anywhere right into your string, without worries.. (except JavaScript's (')) Cheers! -----Original Message----- From: Marko Vukovic' [mailto:vukko@cequrux.com] Sent: Wednesday, August 30, 2000 8:07 PM To: Maxim Maletsky Cc: PHP General List. (E-mail) Subject: Re: [PHP] Single Quote vs. Double Quote.. Maxim Maletsky wrote: > > Hi all, > I just was wondering what is everyone of you thinking about using single > quotes > in most of the strings. > > I know well the difference between Single and Double quotes, but why when > people > write even a simple string they usually use Double Quotes? I personally use single quotes only for the html stuff because: A) I don't have to hold down the shift key to type it and B) I use single quotes in my html, that way I can write stuff in an echo without having to backslash \" the double quotes eg: echo "<img src='image.jpg'>\n"; as opposed to echo "<img src=\"image.jpg\">\n"; I have pulled my hair out many times trying to find missing \'s so I eventually gave up and now use single quotes only in all html. my 2c ;) -- Marko. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#14515) next »