note 10765 added to print_r
| From: | john at defected dot net | Date: | Sun, 21 Jan 2001 05:36:31 +0000 |
| Subject: | note 10765 added to print_r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-10030@lists.php.net to get a copy of this message | ||
Here is a functionf or you php3 users.
function print_r($array) {
if(is_array($array)) {
print("<ul>\n");
while(list($key,$val)=each($key))
{
print("<li> => ");
print_r($val);
print("<li>");
}
print("<ul>");
} else {
print("<b>".$array."</b>");
}
}
http://www.php.net/manual/en/function.print-r.php