Re: [PHP] About printing functions

2009-01-22 Thread Jan G.B.
2009/1/22 Török Alpár : > > > 2009/1/22 Jan G.B. >> >> 2009/1/21 Thodoris : >> >> $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

Re: [PHP] About printing functions

2009-01-22 Thread Török Alpár
2009/1/22 Jan G.B. > 2009/1/21 Thodoris : > >> >> 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_en

Re: [PHP] About printing functions

2009-01-22 Thread Jan G.B.
2009/1/21 Thodoris : >> > 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 mak

Re: [PHP] About printing functions

2009-01-21 Thread Mattias Thorslund
Thodoris wrote: Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print "blah blah blah"; } I was wondering if there is a way to use this output and store it in a var or something without changing the function itself

Re: [PHP] About printing functions

2009-01-21 Thread Török Alpár
2009/1/21 Edmund Hertle > 2009/1/21 Thodoris > > > > > > >> On Jan 21, 2009, at 1:33 PM, Thodoris wrote: > >> > >> Hi gang, > >>> Lets say that you have a function that prints something to the output > >>> simply like this: > >>> > >>> function print_str() { > >>> print "blah blah blah"; >

Re: [PHP] About printing functions

2009-01-21 Thread Paul M Foster
On Wed, Jan 21, 2009 at 08:49:46PM +0200, Thodoris wrote: > > Well Jason my point is theoretical. Lets just say that this function > doesn't just print "blah blah blah" but like tones of html that you may > like to reuse... > > Well you could always change it to this: > > function print_str() {

Re: [PHP] About printing functions

2009-01-21 Thread Thodoris
you can use Output Buffering : That's a good though thanks. Although I was aware of output buffering I used to ignore that ob_end_clean actually exists... -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Thodoris > > >> On Jan 21, 2009, at 1:33 PM, Thodoris wrote: >> >> Hi gang, >>> Lets say that you have a function that prints something to the output >>> simply like this: >>> >>> function print_str() { >>> print "blah blah blah"; >>> } >>> >>> I was wondering if there is a way to

Re: [PHP] About printing functions

2009-01-21 Thread Török Alpár
you can use Output Buffering : 2009/1/21 Edmund Hertle > 2009/1/21 Jason Pruim > > > > > On Jan 21, 2009, at 1:33 PM, Thodoris wrote: > > > > Hi gang, > >> Lets say that you have a function that prints something to the output > >> simply like this: > >> > >> function print_str() { > >> p

Re: [PHP] About printing functions

2009-01-21 Thread Thodoris
On Jan 21, 2009, at 1:33 PM, Thodoris wrote: Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print "blah blah blah"; } I was wondering if there is a way to use this output and store it in a var or something wit

Re: [PHP] About printing functions

2009-01-21 Thread Edmund Hertle
2009/1/21 Jason Pruim > > On Jan 21, 2009, at 1:33 PM, Thodoris wrote: > > Hi gang, >> Lets say that you have a function that prints something to the output >> simply like this: >> >> function print_str() { >> print "blah blah blah"; >> } >> >> I was wondering if there is a way to use this o

Re: [PHP] About printing functions

2009-01-21 Thread Jason Pruim
On Jan 21, 2009, at 1:33 PM, Thodoris wrote: Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print "blah blah blah"; } I was wondering if there is a way to use this output and store it in a var or something wit

[PHP] About printing functions

2009-01-21 Thread Thodoris
Hi gang, Lets say that you have a function that prints something to the output simply like this: function print_str() { print "blah blah blah"; } I was wondering if there is a way to use this output and store it in a var or something without changing the function itself? And store the