Page 1 of 1
$variable and {variable}
Posted: Wed Jul 31, 2002 9:32 am
by kenny
I've seen this many times, yet I don't know how to do it. Can someone please explain how you can change
to
?
Posted: Wed Jul 31, 2002 9:51 am
by llimllib
Simple: you can't.
The {} notation is used inside strings to denote a variable value. For example:
Code: Select all
$string = "cash";
$cashmoney = "{$string}money";
Also, the {} can denote a particular element of a string.
will be the "s" in "cash" (you start from 0).
Is there a particular piece of code you're talking about?
Posted: Wed Jul 31, 2002 12:18 pm
by kenny
No code in particular. I was just wondering, because I've seen it a lot.