From: "Thomas Panzarella" <[EMAIL PROTECTED]> > Hi. I'm new to the list so sorry if this has already > been asked before ... > > I want to find a way to capture the var_dump > output as a string so I can write it to a log file ... > (for example): > > $logger->debug(var_dump($foo)); > > So, the above line would get a "var_dump > stringified" version of $foo and pass it to my > logger's debug method.
You need to use output buffering to capture the output with var_dump. Or you can use print_r(), which will give you a similar output and can be returned to a varible. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php