In Php you can use single quotes and double quotes to enclose strings. But there is a subtle difference between using single quotes and double quotes. When using double quotes, any variable referenced inside the string gets expanded. You don't have to concatenate strings and variables, instead simply put the variables inside the string.
In VS.Php 2.5, we improved the support for variables inside double quoted strings. They are color coded correctly as if they were outside the string. The following illustrates a simple double quoted string referencing a Php variable:

You can even do more sophisticated stuff inside quotes by wrapping a method call inside curly brakets like this:

When editing inside a double quotes string, you also get intellisense for variables.
- webmaster's blog
- Login or register to post comments















Object Variables
While $a is an object, and it's nice to be able to use ${a->var} (for properties, not methods), PHP allows you to use properties of an object within double quotes like this:
echo "value: $a->var";
However vs.php only highlights the $a portion and not the rest of the variable.