|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kichan28 Smarty n00b
Joined: 11 Aug 2018 Posts: 1
|
Posted: Sat Aug 11, 2018 11:11 pm Post subject: Help me with variables |
|
|
Hello, I have a question regarding how to use Smarty, I am new to this.
I have problems with environment variables
I would like to know how to carry out one variable within another, example
Code: | {$decimalamount->price('.{$data.price}.')} |
where Quote: | $decimalamount->price() | is a function and is the result of the database
How do I put the result of one variable into another?
I try Code: |
{$price = $data.price}
{$decimalamount->price('{$price}')}
|
I keep generating more error |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sun Aug 12, 2018 7:28 am Post subject: |
|
|
You're overcomplicating it.
Code: | {$decimalamount->price($data.price)} |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|