Fav Codeigniter Helper Function


Helper Functions are extremely helpfull ;).
We generally print the Array either in the Controller or Model to cross verify weather the data is in the desired format or not before taking to Views.
Typically I use,
echo '<pre>';
print_r( $arrayName );
exit;
But, as I use it a lot, I felt why should I have to rewrite the stuff over and over, why dont I simply create a helper function?.
So, I caretaed a helper which has the same functionality.

/*
Dump and Die !
Print the array in PRE tag and EXIT
*/
if ( ! function_exists('dd'))
{
function dd($Array)
{
echo "<pre>";
print_r( $Array );
exit;
}
}


So, I can use like.
dd( $data );