Skip to the content
Documentation

Negative interger value

No ratings yet

Good day,
Im trying to sustract two interger variables $int1 and $int2, both of then are positive and they are object attributes that I bring to the template system throght a fetch content function. As in the fetch the .content of each interger attribute brings the variables as strings I use a |int templeta function to turn then into interger values and then use:
sum($int1,-$int2)
It seem it does not work, i think is the variables type. How can I work out this problem?. Or how can I set and interger variable negative?