I am stuck and would appreciate any help with this problem. I would like to display my sub categories and my products as such;

Subcategory1
Product1
Product2

Subcategory2
Product1
Product2

So far, my code displays it as this;

Subcatergory1
Subcategory2

Product1
Product2

Any ideas on how I can acheive this or any tutorials which show you how?