Re: underscores ($name_$foo) in string assignments

Kenton Brede
Thu, 15 Feb 2007 01:18:39 -0000

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.