Should it be a boolean value, or something a bit more descriptive/flexible?
print_r($foo,'html');
print_r($foo,'xml');
$output = print_r($foo,'return');
Monte
Denis Arh wrote:
> Yeah, i know this... but... ok... ;)
>
> wouldn't be simplier like this:
>
> print_r($foo, true);
>
> i know how
On Thu, 25 Jul 2002, Tit "Black" Petric wrote:
> > Added in CVS, will be available in 4.3.0.
> >
> > Derick
>
> can you do the same thing for var_dump please?
No I cant, as var_dump supports multiple parameters to it:
var_dump ($foo, $bar, TRUE);
What should TRUE do here in this case, print
On Thu, 25 Jul 2002, Dan Hardiker wrote:
>function printData($variable) {
> return "".print_r($variable,true)."";
> }
>
> echo printData($_SERVER);
> ?>
>
> Currently, this is only possible using output buffering which i would
> prefer to avoid. A real world use is logging / debuggi
> How about adding an extra second parameter to print_r function, that
> would enable HTML output, with s and maybe bold values?
The following would give near enough the desired effect:
";
print_r($variable);
echo "";
}
printData($_SERVER);
?>
However, I would like to see the funct
Try this:
//debugging print_r
function print_pre($r,$prefixmsg='')
{
if ($prefixmsg) $prefixmsg .= ' ';
print "$prefixmsg";
$s = "\n(\n";
ob_start();
print_r($r);
ob_end_flush();
print '';
}
"Denis Arh" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ye
Yeah, i know this... but... ok... ;)
wouldn't be simplier like this:
print_r($foo, true);
i know how to do it, it was just a suggestion...
"Marco Glatz" <[EMAIL PROTECTED]> wrote in message
C1A8D5312515D411908C0050BAB3C06F0FA1A0@GATEWAY">news:C1A8D5312515D411908C0050BAB3C06F0FA1A0@GATEWAY...