Re: associative arrays with template_flexy ?

From: Date: Tue, 27 May 2003 15:00:08 +0000
Subject: Re: associative arrays with template_flexy ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5621@lists.php.net to get a copy of this message
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 -- Xavier

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