Re: Assigning objects to Smarty ?

From: Date: Thu, 26 Apr 2001 16:34:06 +0000
Subject: Re: Assigning objects to Smarty ?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-598@lists.php.net to get a copy of this message
On Thu, 26 Apr 2001, Hojtsy Gabor wrote: > > I had to actually put out a layer of classes on my site and do associative > > arrays instead. I would definitely prefer to pass an array of objects. > > You can: > > $array = (array) $object; > > And then $array would contain the variables from the > $object as an associative array. I think this is what > you need. By using -> you state that it is an object, > but by using . you can use absolutely any data type > (converted to an array :). I just added the ability to use -> to refer to object properties. -Andrei * E Pluribus UNIX. *

« previous php.smarty.general (#598) next »