Emulation: $var = print_r($array)

From: Date: Thu, 04 Apr 2002 14:43:38 +0000
Subject: Emulation: $var = print_r($array)
Groups: php.general 
Request: Send a blank email to php-general+get-91514@lists.php.net to get a copy of this message
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();? Any help is great! :-) Thanks, -- Julio Nobrega.

« previous php.general (#91514) next »