1 is IMO not correct, a string should be quoted.

2 and 3 make no practical difference in this situation,
although 2 is probably somewhat faster because PHP
doesn't substitute variables with their value when they're 
within single quotes.

for code readability it is probaby best if you always use double quotes,
and only if it saves a whole lot of escaping $'s and double quotes within
the string use single quotes.

note that if you like to include both single and double quotes in a long
string (HTML for example) but still want to be able to use variables
in it, you can use 'heredoc notation'.


On Thu, 7 Feb 2002 10:05:18 +0100, B. Verbeek wrote:

>What's the difference between:
>    1.- $row[column_name];
>    2.- $row['column_name'];
>    3.- $row["column_name"];

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to