How to Debug Variables in Smarty like in PHP var_dump()

后端 未结 13 649
别那么骄傲
别那么骄傲 2020-12-22 16:13

I have some variables inside a template and I don\'t know where I assigned them. I need to know what is inside a particular variable; for instance, say I have a variable in

13条回答
  •  既然无缘
    2020-12-22 16:39

    Try out with the Smarty Session:

    {$smarty.session|@debug_print_var}
    

    or

    {$smarty.session|@print_r}
    

    To beautify your output, use it between

     
    tags

提交回复
热议问题