Simple math

From: Date: Fri, 20 Jun 2003 09:12:51 +0000
Subject: Simple math
Groups: php.smarty.dev php.smarty.general 
Request: Send a blank email to php-smarty-dev+get-1626@lists.php.net to get a copy of this message
Hi! I need to make in template something like this {assign var="pages" value=count($items)/4} I cannot find a way to do this in Smarty 2.5.0 except of dirty hack with {php}{/php} Even simplier {$items|count} outputs only "Array" {math ...} doesn't support arrays too. Is there a way to solve it in Smarty 2.5.0 (except using custom functions)? If "No", then: Will it be possible in the next Smarty version and when it will be available? Has anyone a patch against Smarty 2.5.0 to make it possible? Thanks, Konstantin A. Pelepelin

« previous php.smarty.dev (#1626) next »