sm_print_r($a, $b, $c);
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5401
7612ce4b-ef26-0410-bec9-
ea0150e637f0
-* sm_print_r($some_variable);
+* sm_print_r($some_variable, [$some_other_variable [, ...]]);
* Debugging function - does the same as print_r, but makes sure special
* characters are converted to htmlentities first. This will allow
* values like <some@email.address> to be displayed.
* The output is wrapped in <pre> and </pre> tags.
*/
* Debugging function - does the same as print_r, but makes sure special
* characters are converted to htmlentities first. This will allow
* values like <some@email.address> to be displayed.
* The output is wrapped in <pre> and </pre> tags.
*/
-function sm_print_r($var) {
ob_start(); // Buffer output
ob_start(); // Buffer output
+ foreach(func_get_args() as $var) {
+ print_r($var);
+ echo "\n";
+ }
$buffer = ob_get_contents(); // Grab the print_r output
ob_end_clean(); // Silently discard the output & stop buffering
print "<pre>";
$buffer = ob_get_contents(); // Grab the print_r output
ob_end_clean(); // Silently discard the output & stop buffering
print "<pre>";