Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{$foo|@print_r} prints '{$foo|@print_r}' on the screen

Tags:

php

smarty

I want to print array variable $foo. So I have done {$foo|@print_r} this but its prints like "{$foo|@print_r}" on the front page.

I'm using the Oxied eshop and its use smarty as a template engine.

like image 664
Nishant Patel Avatar asked Dec 21 '22 16:12

Nishant Patel


1 Answers

Try at least: that the array print for php in common

<?php
     print_r ($foo);
?>

Else try something like:

<?php
     {$foo|@debug_print_var} 
?>
like image 197
Dorvalla Avatar answered Dec 23 '22 05:12

Dorvalla