syntax - php {$var} meaning -
hello,
what meaning of {$var}
in php?
example:
$query = "update table set field = '{$var}'";
thx.
{$var}
"shields" variable name surrounding characters. example:
$root = "stick"; echo "{$root}y"; # adjectify!
will output "sticky", where:
$root = "stick"; echo "$rooty"; # adjectify! no, kidding.
will output nothing @ all, since variable $rooty
doesn't exist.
it allows use expressions more variable names, array indexing or property access.
Comments
Post a Comment