PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty2/plugins/function.printr.php

http://zoop.googlecode.com/
PHP | 29 lines | 14 code | 6 blank | 9 comment | 1 complexity | b3b7050874eabaac403d15bbc3d7f761 MD5 | raw file
 1<?php
 2
 3/*
 4 * Smarty plugin
 5 * -------------------------------------------------------------
 6 * Type:     printr
 7 * Name:     reverse
 8 * Purpose:  print out a variable with print_r
 9 * -------------------------------------------------------------
10 */
11
12function smarty_function_printr($params, &$smarty)
13{
14    extract($params);
15	
16    if(!isset($var))
17    {
18        $smarty->trigger_error("assign: missing 'var' parameter");
19        return;
20    }
21	
22	echo "<pre>";
23	print_r($var);
24	echo "</pre>";
25}
26
27/* vim: set expandtab: */
28
29?>