Reply to Re: [SMARTY] simple assign

Your name:

Reply:


Posted by Joe Stump on 06/06/05 19:56

{math equation="a - b" a=-60 b=$posX assign="offSetX"}

That doesn't work? If not then that's a bug IMO with math. Also your
example looks good, did you try adding parenthesis? ie. {assign
var="offSetX" value=(-60 - $possX)}

--Joe

--
Joe Stump
http://www.joestump.net

On Jun 6, 2005, at 9:50 AM, dc wrote:

> 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
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация