I have a variable that will store a twitter account @twitteruser. I need to strip the @ from the variable so that I can create a button link going to their twitter account.
Asked
Active
Viewed 4,367 times
0
-
look here http://stackoverflow.com/questions/4325283/smarty-substr-a-variable – Paul Ishak Jul 23 '16 at 13:35
-
That didn't help, Paul – Denver Prophit Jr. Jul 23 '16 at 17:24
2 Answers
2
If you know the character is the first char, use ltrim. I guess str_replace will search the entire string ;)
{$twitterUser|ltrim:'@'}

Juanga Covas
- 315
- 2
- 5