its returning the wrong value, but doesn’t matter. I think i found the problem - it happens with your snippet too - if the snippet has 2 variables the second one doesn’t work.
If it doesn’t, it should. If you post all your code in here someone might see the problem.
Thanks for everything guys, the trouble in the end turned out to be TinyMCE, it was formatting the string and my switch didn’t work. Now finally everything works with [*my_var*]. Thanks once again.