If you write custom modules for Joomla it is often useful to get the output from an array. So normally you use
But this often kills your complete design and you need to remove that at some development point. A easier way would be to put the output from print into a variable and then output the variable to a comment section (so that it can be only view in a comment section):
$myDebugVar = print_r($yourArray, true);
echo '<!-- '.$myDebugVar.' -->';
Pretty easy or?
Please note that you must remove this above in the final version! Otherwiese everyone could get the content from your array, which could then lead to some first steps to hack your component!