Smarty getting substring of a var with strpos as start and strlen as end

后端 未结 4 1325
面向向阳花
面向向阳花 2021-01-12 02:00

I am having issue formatting variables in smarty. I was wondering what is the best way to do it. Basically i have a string \"ABC | DEFGH\" i want smarty to get the substri

4条回答
  •  走了就别回头了
    2021-01-12 02:22

    When using like Jimby:

    {$var|substr:$bar_at+1}
    

    I add parentheses or round bracket to make it work.

    {$var|substr:($bar_at+1)}
    

提交回复
热议问题