note 86187 added to function.print-r

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
my take on the highlighted markupped debug function:

/**
 * print_array()
 * Does a var_export of the array and returns it between &lt;pre&gt; tags
 * 
 * @param mixed $var any input you can think of
 * @return string HTML
 */
function print_array($var)
{
	$input =var_export($var,true);
	$input = preg_replace("! => \n\W+ array \(!Uims", " => Array ( ", $input);
	$input = preg_replace("!array \(\W+\),!Uims", "Array ( ),", $input);
	return("<pre>".str_replace('>&lt;?', '>', highlight_string('<'.'?'.$input, true))."</pre>");
}
----
Server IP: 83.137.20.135
Probable Submitter: 82.171.111.226
----
Manual Page -- http://www.php.net/manual/en/function.print-r.php
Edit        -- https://master.php.net/note/edit/86187
Del: integrated  -- https://master.php.net/note/delete/86187/integrated
Del: useless     -- https://master.php.net/note/delete/86187/useless
Del: bad code    -- https://master.php.net/note/delete/86187/bad+code
Del: spam        -- https://master.php.net/note/delete/86187/spam
Del: non-english -- https://master.php.net/note/delete/86187/non-english
Del: in docs     -- https://master.php.net/note/delete/86187/in+docs
Del: other reasons-- https://master.php.net/note/delete/86187
Reject      -- https://master.php.net/note/reject/86187
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.