note 95700 added to function.var-export

From: Date: Sat, 16 Jan 2010 23:53:16 +0000
Subject: note 95700 added to function.var-export
Groups: php.notes 
Request: Send a blank email to php-notes+get-165034@lists.php.net to get a copy of this message
I didn't see this simple little item anywhere in the user notes. Maybe I'm blind! Anyway, var_export and print_r both use spaces and carriage returns for formatting. Sent to an html page, most of the formatting is lost. This simple function prints a nicely formatted array to an html screen: function pretty_var($myArray){ print str_replace(array("\n"," "),array("<br>","&nbsp;"), var_export($myArray,true))."<br>"; } ---- Server IP: 192.41.40.227 Probable Submitter: 75.168.107.131 ---- Manual Page -- http://www.php.net/manual/en/function.var-export.php Edit -- https://master.php.net/note/edit/95700 Del: integrated -- https://master.php.net/note/delete/95700/integrated Del: useless -- https://master.php.net/note/delete/95700/useless Del: bad code -- https://master.php.net/note/delete/95700/bad+code Del: spam -- https://master.php.net/note/delete/95700/spam Del: non-english -- https://master.php.net/note/delete/95700/non-english Del: in docs -- https://master.php.net/note/delete/95700/in+docs Del: other reasons-- https://master.php.net/note/delete/95700 Reject -- https://master.php.net/note/reject/95700 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#165034) next »