"Dvdmandt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Now, where did those two paragraphs come from? A bit of experience with
all
> those langs and the BASIC school... I'm at the age of 14 and don't even
know
> math yet so (I mean, I know +, -, / and *, but not advanced stuff).
Hi,
> Depends on the use of the function. (Output functions should produce
> output shouldn't they?!) Best option probably is to specifiy an argument
> that allows to choose wether to output or to return.
> If you return text you should return by reference to prevent unnecessary
> memory consumpti
Hi,
> > My personal opinion, which shows in all my code writing is to
> never echo
> > inside a function. always return the data whether it be string, array,
> > or boolean... I've always left echoing up to the actual page
> showing the
> > data. That way if you have two seperate pages that need t
On Mon, 2003-06-16 at 23:20, Jason Wong wrote:
> On Tuesday 17 June 2003 12:50, DvDmanDT wrote:
> > I was replying to "If you don't do it this way, you'll
> > find yourself re-writing a function sooner or later because you need it
> > to return the data instead of displaying it."... Then you don't
Depends on the use of the function. (Output functions should produce
output shouldn't they?!) Best option probably is to specifiy an argument
that allows to choose wether to output or to return.
If you return text you should return by reference to prevent unnecessary
memory consumption.
Regar
On Tuesday 17 June 2003 12:50, DvDmanDT wrote:
> I was replying to "If you don't do it this way, you'll
> find yourself re-writing a function sooner or later because you need it
> to return the data instead of displaying it."... Then you don't need to
> modify the function if you turn on ob, call f
I was replying to "If you don't do it this way, you'll
find yourself re-writing a function sooner or later because you need it
to return the data instead of displaying it."... Then you don't need to
modify the function if you turn on ob, call function, then get contents,
then clear ob... Ok, it's a
Dan Joseph wrote:
Hi,
Just kind of curious what people think. In your opinion,
should a function avoid output? What I mean by that, is should a
function on "do something" without having echo or printf commands in it?
This is something I've been thinking about lately to improve my
pro
"Dvdmandt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Or you could just temporarily enable ob... That's what I do when I have a
> function that needs to return lots of HTML containing many ' and "... I
know
> it's possible to use \ as well, but ob is somewhat easier then...
You
Or you could just temporarily enable ob... That's what I do when I have a
function that needs to return lots of HTML containing many ' and "... I know
it's possible to use \ as well, but ob is somewhat easier then...
"John W. Holmes" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
>
Rolf Brusletto wrote:
>>Just kind of curious what people think. In your opinion,
>> should a function avoid output? What I mean by that, is should a
>> function on "do something" without having echo or printf commands in it?
>> This is something I've been thinking about lately to impr
Dan -
My personal opinion, which shows in all my code writing is to never echo
inside a function. always return the data whether it be string, array,
or boolean... I've always left echoing up to the actual page showing the
data. That way if you have two seperate pages that need to display the
12 matches
Mail list logo