C:\wamp\www\mydirectory\app\code\core\Mage\Page\Helper\Data.php is my way. I used the print_r function as the pr() function.
Put it in Data.php as shown below.
class Mage_Page_Helper_Data extends Mage_Core_Helper_Abstract { function pr($data) { echo "<pre>"; print_r($data); echo "</pre>"; } }
where the page is mymodule.
Call it from any .phtml file using
Mage::helper("page")->pr($abcd);
Hope this helps.
source share