Variable… thingy… with {}s
Posted: Sun May 15, 2011 11:50 pm
So I've noticed stuff like this happening in the jacek's videos:
So what I want to know is, what's the deal with the brackets? Cuz can't you output it the same way without them? (as in
is it some security measure or something?
AHHHH IT'S SO CONFUSING!!!!
sorry had to spazz out there^
Btw, I already checked the php.net page on variables, and didn't see anything.
$avariable = "hello"; $notavariable = "world"; echo "{$avariable} {$notavariable}!";To output "hello world!"
So what I want to know is, what's the deal with the brackets? Cuz can't you output it the same way without them? (as in
$avariable = "hello"; $notavariable = "world"; echo "{$avariable} {$notavariable}!";)
is it some security measure or something?
AHHHH IT'S SO CONFUSING!!!!
sorry had to spazz out there^
Btw, I already checked the php.net page on variables, and didn't see anything.