irishpeck,
Showing the code will definitely help.
If you want the fastest response here, I'd recommend the following:
1) For future reference - be as descriptive as possible in the subject line
2) Show the code that is relevant to the question/error
3) Give any information which you think may help us to help you
In this case - I would show the code where you are (and IF you are) pulling the subcategories from the database.
On the note of the database, it is important to know which database you are backing on to, for instance MySQL, or Microsoft SQL Server, PostgreSQL
Also, please be sure to put code in between the code / php bbtags [ code] [ /code] or [ php] [ /php] (without the spaces)
Best of luck..