Re: [SMARTY] DB_DataObject and Smarty [Solved, I think]

From: Date: Fri, 06 Oct 2006 09:24:01 +0000
Subject: Re: [SMARTY] DB_DataObject and Smarty [Solved, I think]
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13494@lists.php.net to get a copy of this message
Well, I was able to use MDB2_Iterator as my iterator. After instantiating and initializing it, I'm able to iterate through it fine using straight PHP (similar to the above code), but I can't get it to work in Smarty. I no longer get the error (using ->register_object() but I do get it using ->assign()) but now it's not displaying anything; it doesn't appear that Smarty is iterating through anything. Is there something I'm missing?
Neither register_object() nor assign() were working for me so I decided to try assign_by_ref() as sort of a last ditch attempt. Surprisingly, it worked! :) However, I'm not sure if that is the correct solution. Why did assign_by_ref() work and register_object(), at the very least, did not? thnx, Chris

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