note 54493 added to function.print-r
| From: | jteyatuoguelphdotca at osu1 dot php dot net | Date: | Wed, 06 Jul 2005 05:36:31 +0000 |
| Subject: | note 54493 added to function.print-r | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91503@lists.php.net to get a copy of this message | ||
The simplest way to print out the array to the browser in nice formatting is as follows:
echo highlight_string(print_r($myArray,true),true);
This eliminates the need to create a custom function as suggested a couple of notes below.
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54493
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54493&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54493&report=yes
Search -- http://master.php.net/manage/user-notes.php