note 43080 added to function.print-r
| From: | news dot php at linkas dot it | Date: | Wed, 09 Jun 2004 07:24:33 +0000 |
| Subject: | note 43080 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70441@lists.php.net to get a copy of this message | ||
The easy way to print an array into readable HTML (no fancy stuff):
// Print the array into a var using the boolean parameter
$vector=print_r($your_array,true);
// Convert new lines into break-line tags
$vector=nl2br(htmlentities($vector));
// Print it
echo $vector;
can even be done with:
echo nl2br(htmlentities(print_r($your_array,true)));
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43080
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43080&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43080&report=yes
Search -- http://master.php.net/manage/user-notes.php