header
 
     
 
pixel
pixel pixel

Single quotes versus double quotes

Use single quotes around strings whenever possible as it makes less work for the PHP parser. Exceptions where you do need to use double quotes: when outputting variables, using single quotes and escape characters (eg - \n).
Unhelpful Helpful Rating 3.9 (score out of 5, no. of ratings: 8)
Comments
Comment by harry on 2005-03-20
help ful

Comment by Student on 2006-10-27
Very Helpful. I am just starting out and couldn\'t understand why the variable values couldn\'t be displayed and then I realised that I was using single quotes instead of double.

Post a Comment
Name
Email
(optional)
Comment
RatingUnhelpful Helpful
Security Image* (this is just to prevent spam submissions)
Security Image