Re: associative arrays with template_flexy ?

From: Date: Tue, 27 May 2003 16:16:27 +0000
Subject: Re: associative arrays with template_flexy ?
References: 1 2  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-5630@lists.php.net to get a copy of this message
This could be added, although there would be a limitation on using \' within the name.. (as it adds alot of complexity to the parser) Regards Alan Xavier wrote:
daniel.garcia@assertio.es wrote:
Hi, I'm quite happily using template_flexy, and I wonder if there is a way to use associative arrays items for the variables. Currently I'm using an array in the controller class to store all the html chunks, and I think it would be quite convenient to access the chunks by a more explicit name. I mean, I can use a template with: <p>{elements[31]}</p> but I'd rather use an easier name like: <p>{elements['menu']}</p> or <p>{elements['navigation_header']}</p>
Well, i had the same problem , but i think using objects is the better way, so you can then use a syntax like : {element->value}. regards


« previous php.pear.general (#5630) next »