-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
double vs single quotes #73
Comments
Why couldn't you simply solve this in your PHP using single quotes?
|
PHP doesn't allow variables inside single quotes and treats them as literals.
This is a very common idiom in PHP. |
This is an HTML and CSS code guide, so it doesn't take any other programming language into account for the most part. That sounds like a pretty shitty limitation on PHP's part though 😆. |
👍 haha On Mon, Mar 17, 2014 at 10:45 AM, Mark Otto notifications@github.comwrote:
|
What is the motivation for single vs double quotes?
It is often desirable to switch between the two as per convenience. For example in PHP it is better to write (1)
echo "<a href='$href'>";
as opposed to (2)"echo <a href=\"$href\">";
.HTML and for that matter most other languages allow for single versus double quotes for this reason.
The text was updated successfully, but these errors were encountered: