Joe Maller.com

Even though I’m still quite a PHP novice, I’m fairly sure having “echo” and “print” statements in functions is a bad idea. A better idea is to use a return variable containing all the text which would be output by the echo/print statements. This allows for much more flexibility in working with the results of the function. Now if only more of the PHP books I bought had mentioned that…

Share |
link: Jul 16, 2002 12:57 pm
posted in: misc.

Comments are closed.