Re: [SMARTY-DEV] Variable variables

From: Date: Wed, 05 Jun 2002 13:29:40 +0000
Subject: Re: [SMARTY-DEV] Variable variables
References: 1 2 3 4  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-113@lists.php.net to get a copy of this message
On Wed, 05 Jun 2002, Martijn van Zal wrote: > Hmmm, indeed :)))) > > I've tried it in an earlier release and got problems, but it works fine now. > but how does smarty know what object to take? I now use {$object->$row.row} > where $row.row is an attribute of $object. But what if $row is the attribute > (hash?) of $object, and 'row' is an index of that hash, would it work too > then? {($object->$row).row} ? Simple. You can only use simple variables for properties. {$object->$row.row} is not allowed. You'd have to do: {assign var="temp" value=$object->$row} {$temp.row} -Andrei http://www.gravitonic.com/ * Unix is user friendly, it is just chooses its users selectively. *

« previous php.smarty.dev (#113) next »