0

Possible Duplicate:
Difference between single quote and double quote string in php

We can include the name of a variable right inside a text string and have the value inserted in its place if we surround the string with double quotes instead of single quotes.

why does not it works in case of single quotes?

Ryan M
  • 18,333
  • 31
  • 67
  • 74
The Realmccoy
  • 329
  • 1
  • 2
  • 9
  • 4
    Because that's how it's meant to be. See [Difference between single quote and double quote string in php](http://stackoverflow.com/questions/3446216/difference-between-single-quote-and-double-quote-string-in-php) – Álvaro González Jan 15 '13 at 12:46
  • 1
    That's how it is: http://php.net/manual/en/language.types.string.php – Felix Kling Jan 15 '13 at 12:47

1 Answers1

1

That is exactly the intended difference between single and double quotes, the double are used when something might need to be replaced by the interpreter, and single quotes tells php that the string will be as is..

ikku
  • 405
  • 3
  • 14