[nycphp-talk] variable variables in heredoc string

Daniel Convissor danielc at
Sat Feb 18 13:49:39 EST 2006

On Sat, Feb 18, 2006 at 01:40:02PM -0500, Marc Antony Vose wrote:

> this question seems so elementary, yet i can't seems to figure out 
> the right combination of curly braces and whatnot.
> if i have a variable variable such as:
> ${$uc.'content_width'} = 170;
> How can I use it inside a heredoc assignment?
> ${$uc.'content'} = <<< ENDENDEND

$uc = 'foo';
${$uc.'content_width'} = 170;
echo ${$uc.'content_width'};

${$uc.'content'} = <<< ENDENDEND
inside ${$uc.'content_width'} heredoc

echo ${$uc.'content'};


 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

More information about the talk mailing list