Re: print_r output to a file

From: Date: Thu, 07 Nov 2002 11:41:24 +0000
Subject: Re: print_r output to a file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123137@lists.php.net to get a copy of this message
ahahahaha... i plead insanity "Ernest E Vogelsinger" <ernest@vogelsinger.at> wrote in message news:5.1.1.6.2.20021107115742.02c2a228@mail.vogelsinger.at... > At 11:12 07.11.2002, Kerry Kobashi said: > --------------------[snip]-------------------- > >Is there a way to send print_r output to a file? > --------------------[snip]-------------------- > > rtfm :) > pardon me, but I couldn't resist... > > ok, specifically: > http://www.php.net/manual/en/function.print-r.php > > Tip: As with anything that outputs its result directly to the browser, you > can use the output-control functions to capture the output of this > function, and save it in a string (for example). > > output-control functions: > http://www.php.net/manual/en/ref.outcontrol.php > > You could, for example: > > ob_start(); > print_r(your_array); > $result = ob_get_contents(); > ob_end_clean(); > > > -- > >O Ernest E. Vogelsinger > (\) ICQ #13394035 > ^ http://www.vogelsinger.at/ > >

« previous php.general (#123137) next »