On Thursday 04 April 2002 22:43, Julio Nobrega Trabalhando wrote:
> Is there a way to do something like this?
>
> I wrote a wanna-be debugger. It just write to a file simple and common
> used function and variables, array or objects. Then when I activate it, a
> new window is opened with these information. Simple stuff.
>
> The problem is that if I do this:
>
> fwrite($fp, $_SESSION);
>
> It will record Array, of course. If I serialize it, it's unreadble
> compared to print_r();
>
> $var = print_r($array), well, prints the array like I suspected.
>
> Is there a way to "emulate" var_dump(), print_r() so I can write it to a
> file and when I open this file the information are shown like if I really
> did a print_r();?
ob_start();
print_r($doo);
$dah = ob_get_contents();
ob_end_clean();
echo $dah;
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Whatever you do will be insignificant, but it is very important that you do
it.
-- Gandhi
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php