Skip to content

Instantly share code, notes, and snippets.

@vrushank-snippets
Created June 27, 2012 09:52
Show Gist options
  • Save vrushank-snippets/3003039 to your computer and use it in GitHub Desktop.
Save vrushank-snippets/3003039 to your computer and use it in GitHub Desktop.
CODEIGNITER : Print Array Helper
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('mpr'))
{
function mpr($d, $echo = TRUE)
{
if($echo)
{
echo '<pre>'.print_r($d, true).'</pre>';
}
else
{
return '<pre>'.print_r($d, true).'</pre>';
}
}
}
if ( ! function_exists('mprd'))
{
function mprd($d)
{
mpr($d);
die;
}
}
if ( ! function_exists('mvr'))
{
function mvr($d)
{
echo '<pre>'.var_dump($d, true).'</pre>';
}
}
if ( ! function_exists('mvrd'))
{
function mvrd($d)
{
mvr($d);
die;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment