Pages

Thursday, August 4, 2011

print_r in Smarty development

{$foo|@print_r}

The @ tells smarty to pass the entire array to the modifier rather than calling the modifier for each element of the array. 


Smarty also print array like php print_r() function: {$foo|@debug_print_var}

Developer may also consider smarty's debug facility (which developer can enable in-template by inserting a {debug} tag).

No comments:

Post a Comment