Re: Reduce execution time in loops

From: Date: Wed, 05 Dec 2001 08:30:20 +0000
Subject: Re: Reduce execution time in loops
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2142@lists.php.net to get a copy of this message
Hello, Andrei Zmievski wrote:
$this->_sections["sl"]['properties']['rownum'] = $this->_sections["sl"]['properties']['iteration']; $this->_sections["sl"]['properties']['index_prev'] = $this->_sections["sl"]['properties']['index'] - $this->_sections["sl"]['properties']['step']; $this->_sections["sl"]['properties']['index_next'] = $this->_sections["sl"]['properties']['index'] + $this->_sections["sl"]['properties']['step'];
$this->_sections["sl"]['properties']['first']      = ($this->_sections["sl"]['properties']['iteration'] == 1);
$this->_sections["sl"]['properties']['last']       = ($this->_sections["sl"]['properties']['iteration'] == $this->_sections["sl"]['properties']['total']);
Would it not be possible to create a special function {sectionprop} or something? That function would do the evaluations, so someone who doesn't use it does not get the overhead. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

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