Takes session or class or array as object and returns HTML'ized categorized string to be echoed.
I find it handy when searching for data/debugging from huge class or session variables.
Code: Select all
function print_object($object)
{
$needles=array( "{" , ";" , "(" , "," , ")" , "}" );
$replace=array( "<BLOCKQUOTE>" , "<BR><BR>" , "<BLOCKQUOTE>" , "<BR>", "</BLOCKQUOTE>" , "</BLOCKQUOTE>");
$tmp = str_replace($needles, $replace, var_export($object,1))."<BR><BR>";
return $tmp;
}