Ok now i have two table categories and subcategories like this
Categories:
id
title
description
Sub Categories:
id
catid
title
description
Now the ‘catid‘ of the subcategories will have the value of categories ‘id‘ and i want to group my and loop my categories and sub categories and display it like
Category
subcat
subcat
categories
subcat
subcat
This should display your categories and subcategories as such:
and so on