simple assign
| From: | dc | Date: | Mon, 06 Jun 2005 16:50:15 +0000 |
| Subject: | simple assign | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-12671@lists.php.net to get a copy of this message | ||
how do i just get the result of a calc assigned to a variable?
eg:
{assign var='offSetX' value=-60-$posX }
if posX is 30 returns:
"-60-30"
whereas i want -90
math and eval dont seem to be the way to do it either...
even tho i have done really tricky stuff in smarty, every time i go away for a day i get stumped by the syntax on variables. it really is kind of un-intuitive...
{capture ... } ?
/dc