use mysql
have a table that is categories
have another that is sub categories
then have artices. the tables should have a common field between then
so it would go like this
Categories
-----------
category_id
cat_name
subcats
--------
parrent
name
articles
-------
category
artilce stuff down here
then just reference php.net for coding samples it is a great resource