Dump
dump — Dumps values of the given variable, or the entire data if nothing provided
var: the variable to display, by default it shows the current scope
Examples:Where template is: Both syntax will work {$rate|dump} or {dump $rate}
{math equation="10*(2/5)" assign=amount}
{dump $amount}
The above example will output:
4.0
{math equation="10*(2/5)" assign=rate}
{$rate|dump}
The above example will output:
6.0
$contacts assign using PHP in your app as
$tplix->assign('contacts', [
['phone' => '555-555-1234', 'fax' => '555-555-5678', 'cell' => '555-555-0357'],
['phone' => '800-555-4444', 'fax' => '800-555-3333', 'cell' => '800-555-2222'],
]);
where template as
{$contacts|dump}
The above example will output:
dump:
0 (array):
phone = '555-555-1234'
fax = '555-555-5678'
cell = '555-555-0357'
1 (array):
phone = '800-555-4444'
fax = '800-555-3333'
cell = '800-555-2222'