Re: About printing functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/1/21 Thodoris <tgol@xxxxxxxxxx>:
>> <?php
>>   ob_start();
>>      badFunctionThatSpitsInsteadOfReturning();
>>   $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
ob_start(); echo 1;
$retVar = ob_get_clean();

http://de.php.net/ob_get_clean()


Byebye

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux