If it's one or two lines, a function can be more distracting than it's worth.
Until you find an error in those lines, or you need to add an extra line. It all depends upon you philosophy of programming. To most people a good program is one that works. To me a good program has three important characteristics: 1. It does what the specifications require under all circumstances. 2. It is efficient in the use of resources, both computer and human. 3. It is easily maintained by someone other than the original programmer. Keep in mind that the creation cost of a production program (it's actually being used) is a small fraction of the original cost.
--Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
Urb Dr. Urban A. LeJeune, President E-Government.com 800-204-9545 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php