variable object referencing
| From: | Monte Ohrt | Date: | Mon, 10 Feb 2003 17:34:18 +0000 |
| Subject: | variable object referencing | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-671@lists.php.net to get a copy of this message | ||
There's a problem with supporting this syntax:
{$foo->$bar}
Pre 2.4.0, the compiled template would look like this:
<?php echo $this->_tpl_vars['foo']->$bar; ?>
But, since $bar is an assigned value and we don't extract them anymore,
the engine tries to compile to this:
<?php echo $this->_tpl_vars['foo']->$this->_tpl_vars['bar']; ?>
Notice the syntax problem, PHP does not like it. Maybe I'm missing
something easy, but is there a way to make this work?
Monte
--
Monte Ohrt <monte@ispi.net>