If you write custom modules for Joomla it is often useful to get the output from an array. So normally you use

print_r($YourArray);

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!

Leave your comments

Post comment as a guest

0

Comments

    • No comments found