$foo|@print_r

Sometimes you are in need of some specific values for an Array or Object, here comes print_r modifier to help.

{$foo|@print_r}

For example in News module you could use.

<pre>{$entry|@print_r}</pre>

As an example you can see output from News Detail Template:

stdClass Object ( 
    [id] => 1 
    [author_id] => 1 
    [author] => uniqu3 
    [authorname] => 
    [title] => News Module Installed 
    [content] => The news module was installed. Exciting. This news article is not using the Summary field and therefore there is no link to read more. But you can click on the news heading to read only this article. 
    [summary] => 
    [postdate] => 2010-12-11 21:50:21 
    [startdate] => 
    [enddate] => 
    [category] => General 
    [extra] => 
    [canonical] => http://domain.com/1.9.2/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=1&cntnt01origid=15&cntnt01returnid=39&cntnt01returnid=39 
    [fieldsbyname] => Array ( ) 
    [fields] => Array ( ) 
    [file_location] => http://domain.com/1.9.2/uploads/news/id1 
    [printlink] => Drucken 
    [printurl] => http://domain.com/1.9.2/index.php?mact=News,cntnt01,print,0&cntnt01articleid=1&cntnt01showtemplate=false&cntnt01returnid=39 
) 1

Comments