Int incr/decr on the fly

From: Date: Fri, 16 Jan 2004 15:27:59 +0000
Subject: Int incr/decr on the fly
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10827@lists.php.net to get a copy of this message
Hi all, assuming I use a generic tag: {tag var="$myvar"} assuming $myvar is an integer, I would like only to increment or decrement its value by 1 without previously use a math tag. {tag var="$myvar++"} How is it the correct syntax for it? Further more, it could be an idea to create a math modifier for more complex equation: {tag var="$myvar|math:x+6"} where x is assumed to be $myvar. What do you think? I searched the manual, without answer found, I'm sorry if someone has already sent this post, I hadn't time enough to check the past mails. Cheers Luca

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