Re: About printing functions

From: Date: Thu, 22 Jan 2009 13:27:30 +0000
Subject: Re: About printing functions
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-287003@lists.php.net to get a copy of this message
2009/1/22 Török Alpár <torokalpar@gmail.com>: > > > 2009/1/22 Jan G.B. <ro0ot.w00t@googlemail.com> >> >> 2009/1/21 Thodoris <tgol@kinetix.gr>: >> >> $sReturned = ob_get_contents(); >> >> ob_end_clean(); >> > That's a good though thanks. Although I was aware of output buffering I >> > used >> > to ignore that ob_end_clean actually exists... >> You can even make it shorter by using >> $retVar = ob_get_clean(); >> http://de.php.net/ob_get_clean() > Yes, but that leaves output buffering on, and that's a bad thing, especially > if you are on the console, but anyhow, why leave it on when you don't need > it, or even if you do, why create more levels? That's not true. From the PHP Manual (link above): string ob_get_clean ( void ) Gets the current buffer contents and delete current output buffer. *ob_get_clean() essentially executes both ob_get_contents() and ob_end_clean().* bye

« previous php.general (#287003) next »