Skip to content

Instantly share code, notes, and snippets.

@arslanbekov
Created May 6, 2014 06:41
Show Gist options
  • Save arslanbekov/7305f045e00c489c85cd to your computer and use it in GitHub Desktop.
Save arslanbekov/7305f045e00c489c85cd to your computer and use it in GitHub Desktop.
function print_r_pre($DATA, $NAME_VARIABLE = '', $SECURE = true, $IPS = array()) {
$IPS = array_merge(array(
'***REMOTE_ADDR***'
), $IPS);
if (in_array($_SERVER['REMOTE_ADDR'], $IPS)) {
echo '
<div style="background: rgb(119, 87, 87) !important; color: #ffffff !important; font-size: 12px !important; margin: 10px; padding: 10px;">
<b>< DATA DEBUG \></b><br />
' . ($NAME_VARIABLE != '' ? '<br />VARIABLE: ' . $NAME_VARIABLE . '<br />' : '') . '
<pre>
';
print_r($DATA);
echo '
</pre>
</div>
';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment