So I've long known that PHP makes a distinction between single and double quotes when creating strings, though apparently I didn't understand everything about this. (There's actually a third way to create strings, Heredoc, but that method is so drastically different that you won't likely get it confused with the other two.) I was able to create a nice little bug that took me quite awhile to diagnose.
Basically, strings enclosed with double quotes are interpreted by PHP. Strings with single quotes are not.
The obvious implication is that with double quotes, you can insert PHP variables directly into string without concatenation. Also, you're forced to escape (\) a more stuff with single quotes.
$single_quotes = 'Jim\'s salary is: ' . $salary . '.'; $double_quotes = "Jim's salary is: $salary.";
I've known about this since I first learned PHP. But what didn't exactly sink in is how they handle escaped characters differently.
$single_quotes = 'foo\n\tbar'; $double_quotes = "foo\n\tbar";
$single_quotes will contain exactly what you see: foo\n\tbar, whereas $double_quotes will contain foo and bar separated by linefeed and tab characters. PHP actually interpreted the escaped characters, instead of simply forming the literal string. This can create some nasty bugs if you don't realize this.
In the majority of cases, there won't be any difference in the two. In that case, it would be a matter of personal preference and consistency.