php - Prepending a string to a Smarty variable -
i'm looking way prepend string smarty variable. have dynamic form having element-names input-1
(where 1 id of setting/field).
i've tried {capture}{/capture}
seems work first time (as fields displayed loop).
is there opposite function |cat:'text'
smarty, or have to:
- create own modifier
- rename inputs
i'm not sure understand you're trying achieve, there alternative syntax cat
, using backticks (and more elegant , clear imho):
using cat:
{"my string"|cat:$my_var|cat:"other string"|cat:$other_var}
the same, using bacticks:
{"my string `$my_var` other string `$other_var`"}
using backticks, can place variables anywhere inside string:
{"input-`$id`"}
Comments
Post a Comment