Try:
function getStringFromObj($prmObjIn)
{
ob_start();
var_dump($prmObjIn);
$output = ob_get_contents();
ob_end_clean();
return $output;
}
I grabbed this from user comments somewhere on php.net. It works a treat.
-----Original Message-----
From: Chien-pin Wang [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 05:02
To: [EMAIL PROTECTED]
Subject: [PHP] print_r style array content
Dear All,
I wonder if there is a php function that could return content
of an array, in print_r style, as a string. I need to get it and
send as debug information. If not, is there a workaround or
alternative, other than writing a function? Many thanks.
Chien-pin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]