How to dynamically create html page and put it a folder with php?

I am working on a personal ecommerce project and was wondering how can i dynamically create html pages for my list of categories in my DB.

[php]categorie in DB

id categories
1 sneakers
2 baskets
3 boots
4 mocassins[/php]

So after i queried the categories from db, i want to create them dynamically like example

[php]sneakers.html
baskets.html
boots.html
mocassins.html[/php]

How can i achieve that with php? any tips, guidelines or tutorials will help.

That isn’t exactly how it works.

You would create a template file using variable for what will change, price, description, image, ectera. Based on the id passed to the template, those variables would be replaced with the data that is stored in the database.

Sponsor our Newsletter | Privacy Policy | Terms of Service