Hello In a component, I was trying to do: $bar = "lets make a new string with $name_$foo in it." however the "$name_" fails to appear in the resulting string: "lets make a new string with valueOfFoo in it." Is there something special about $name_ here? If I replace the underscore with a dash (... $name-$foo ... ) it works fine. thanks Jesse Jesse Reynolds Virtual Artists Pty Ltd - http://www.va.com.au/ Phone: 08 8223 2288 Mobile: 0414 669 790
On 2/14/07, Jesse Reynolds <jesse@va.com.au> wrote:> Hello > > In a component, I was trying to do: > > $bar = "lets make a new string with $name_$foo in it." > > however the "$name_" fails to appear in the resulting string: > > "lets make a new string with valueOfFoo in it." > > Is there something special about $name_ here? > > If I replace the underscore with a dash (... $name-$foo ... ) it > works fine.Have you tried ${name}_${foo} ? If you''re going for something like: $name = foo and $foo = bar and expecting result, "foo_bar." Kent -- "It may be true that the law cannot make a man love me, but it can stop him from lynching me, and I think that''s pretty important." - Martin Luther King Jr.
On 15/02/2007, at 12:18 PM, Kenton Brede wrote:> On 2/14/07, Jesse Reynolds <jesse@va.com.au> wrote: >> Hello >> >> In a component, I was trying to do: >> >> $bar = "lets make a new string with $name_$foo in it." >> >> however the "$name_" fails to appear in the resulting string: >> >> "lets make a new string with valueOfFoo in it." >> >> Is there something special about $name_ here? >> >> If I replace the underscore with a dash (... $name-$foo ... ) it >> works fine. > > Have you tried ${name}_${foo} ? If you''re going for something like: > $name = foo > and > $foo = bar > and expecting result, "foo_bar."Ah, thank you. So I guess it was looking for a variable $name_ which doesn''t exist.