Dan Anderson <mailto:[EMAIL PROTECTED]> on Wednesday, August 20, 2003 3:04 PM said:
> You want to break off things into as many functions and components as > possible. Hmm.. Ok. So right now I've got this (psuedo code): function displayAttributes($id) { // query db // store results in array // perform logic that builds HTML string // return HTML string } But instead you think I should do this: function GetAttributes($id) { // query db // get records // return record array } function BuildAttributes($id) { $attributes = GetAttributes($id); // format $attributes // return HTML string } Is that what you're suggesting? > The idea is that if you want to change the way tables are > displayed with the data, for instance, you can't break the way data is > queried. I don't understand this exactly. What do you mean by "can't break the way data is queried"? > I usually have a bunch of different files like > "inc.function.something.php" and use lots of require_once() > statements. Hmm.. Although this sounds like a good idea at first, it seems like it would get pretty complicated really fast. Am I missing something? Thanks. Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php