Sort of a userfriendly var_dump, this function will list any requested variables it can lay its hands on, and collapse the list for you to expand at will. All global variables at the tip of a mouse. If I include this on pages that do not work correctly, the problem never stays hidden for long!
Download
View Source (print view)
Rating : 4.7
Views : 420
<?
$dump_count=0;$dump_flag=0;
function dumpdata($v="GLOBALS") {
if(!strstr($_COOKIE['pw'],'secret6'))
return false; // for my eyes only
global $dump_count,$dump_flag;$skip=array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_COOKIE_VARS","HTTP_ENV_VARS","HTTP_POST_FILES","HTTP_SERVER_VARS"); // skip those
// strangely the $_SESSION vars are never made public, but the $HTTP_SESSION_VARS are available.
echo "<blockquote id="dump$dump_count" style="margin:0px 18px;".($dump_flag?"display:none":"")."">n";
$q="while(list($key,$val) = each($".$v.") ) { ".
" $dump_count++; ".
" if( $key===0 || !in_array($key,$skip) ) ".
" echo "<b>$$key</b> = ".@htmlspecialchars( (string) $val)." ".(is_array($val)?count($val)==0?"0":"<a href=javascript:void((a=document.getElementById("dump$dump_count").style).display=a.display=="none"?"block":"none")>".count($val)."</a>":"")."<br>n"; ".
" if( is_array($val) && $key != "GLOBALS"&& !in_array($key,$skip) ) { ".
" $dump_flag=true;dumpdata( $v."[".$key."]" ); ".
"}}";
eval($q);
echo "</blockquote>n";
}
?>
snnap_ss, salars77, paper_without_wood, guest, enfactuation, rent a car, download, regirstration form, php_snips, fedex, call php', userstatusinonline, php_script"_class="neww"_target="_blank"_title="im_neuen, best ide, php script" class="neww" target="_b..., forum, p t test paired, php_tools, href php function, utfraw, php jobs