Hopefully this is the right place to ask this question...
How do I get the last two characters of one variable/string into another variable/string?
Thanks!
Hans
[SOLVED]Smarty: how to get last two characters of a string
[SOLVED]Smarty: how to get last two characters of a string
Last edited by hdriezen on Wed Aug 24, 2011 1:06 pm, edited 1 time in total.
Re: Smarty: how do I get the last two characters of a string
Code: Select all
{capture name=some_content assign=anotherVar}{$anotherVar}{$oneVar|substr:-2}{/capture}
Re: Smarty: how do I get the last two characters of a string
Great, Jos, many thanks!
Hans
Hans