sorry, the overuse of the words 'table' and 'array' in my last post make it quite hard to understand.  but i promise it works.