//You are free to use below given code, provided you indicate author.
//Author:Levan Tcheishvili (levan@kaz-incon.com).
//
//Very simple, but useful function while debugging your PHP programms.
//
//How to use:
//
//print_arr($your_array);
//
//That is it ! And see what's inside your PHP array.
//Note: Do not enter $level variable it is for internal purpose.
function print_arr($arr,$level=0){
$spaces="";
for($i=0;$i<$level;$spaces.='-',$i++);
if (!is_array($arr)) {echo $spaces,"$arr<br>"; return 1;}
reset($arr);
while ( list( $key, $val ) = each( $arr ) ){
if (is_array($arr[$key])) {
echo $spaces,"$key=><br>";
$level++;
print_arr($arr[$key],$level);
$level--;
} //if
else echo $spaces,"$key=>$arr[$key]<br>";
}
//**********************************************
}//print_arr
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP , PHP , HTML , PDF , Excel Calendar using Date function Categories : HTML and PHP , PHP , Date Time , Calendar UDMSearch - a free search engine, indexing system. Categories : Search Engines , Linux , PHP , MySQL , ODBC how to check if a string contains a letter from a different language? Categories : PHP , Regexps , Languages Save time debugging PHP3 under UNIX/Linux using linked .phps files Categories : HTML and PHP , Debugging , PHP PostGreSQL and MySQL 2 in 1 db Manager Categories : PHP , PHP Classes , Databases , PostgreSQL , MySQL AJAX Data Grid System using php and mysql. A complete login system with the ability to display data in a grid using ajax. Add , update and delete the records without reloading the page. Categories : PHP , AJAX , Databases , MySQL , Java Script fforum fumanchi forum MySQL treestructure Categories : Complete Programs , PHP , MySQL ibase_close -- Close a connection to an InterBase database Categories : PHP , PHP Functions , InterBase How to pass an array to a function, or how to define a
function wich recieves an array. Categories : Variables , PHP , Arrays Simple class to build tables with style sheets Categories : HTML and PHP , PHP Classes , PHP Show Source with Line Numbers Categories : PHP , Regexps , Filesystem This simple function will take a few arguments and easily set a associative array for each column in a result from a MySQL query Categories : Databases , PHP , MySQL , Arrays Dynamic Image Authentication System in Signup Pages (CAPTCHA) Categories : PHP , Security , GD image library How to find the name of the current file? Categories : PHP , Filesystem , Strings