Multiply template variable |
06-17-2020, 11:57 AM
(This post was last modified: 06-17-2020, 12:02 PM by Digital_Wolf. Edit Reason: Fixed syntax types ) (06-17-2020, 10:03 AM)Ceo Wrote:(06-17-2020, 09:58 AM)php_rocs Wrote: @Ceo,CI4. Well, in the end, it outputs correctly, because you are just trying to change the template itself, and not perform an operation on it ... In general, you just need to move the multiplication operator out of curly braces, like this: {myVar} * 1000, and if myVar is a string containing at least one digit, php will try to convert it to a number. More on this here: type-juggling p.s. Sorry my English :~ I would change this world, but God doesn't give me the source.
|
Messages In This Thread |
Multiply template variable - by Ceo - 06-17-2020, 09:55 AM
RE: Multiply template variable - by php_rocs - 06-17-2020, 09:58 AM
RE: Multiply template variable - by Ceo - 06-17-2020, 10:03 AM
RE: Multiply template variable - by Digital_Wolf - 06-17-2020, 11:57 AM
|