For every problem involving repetition, there are only three parts: a beginning, a middle, and an end. You usually code once for the middle, and call (Ed.: make a function call) for the beginning and end.
07/15/05 :: Article :: Meaningless Primary Keys, Arrogance :: You're wrong, I won't tell you why, but the results will be disastrous. *makes "spooky fingers" gesture*