note 28496 deleted from function.print-r by aidan

From: Date: Mon, 11 Oct 2004 13:06:17 +0000
Subject: note 28496 deleted from function.print-r by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78333@lists.php.net to get a copy of this message
Note Submitter: wieri420 at planet dot nl ---- If you don't like the output format of print_r(), this function will give you a good overview of your (multidimensional) array in a html friendly format. function analyze(&$array) { foreach($array as $key=>$value) { if(is_array($value)) { echo "<li>Array:<blockquote>"; analyze($value); echo "</blockquote>"; } elseif(is_object($value)) { echo "<li>Object:<blockquote>"; analyze($value); echo "</blockquote>"; } else { echo "<li>[" . $key . "] " . $value; } } } Customize the function to your needs.

« previous php.notes (#78333) next »