I need to import a large category .txt file to my mysql database. This text file has categories with 3 levels.
My text file look likes the example below (+/- 362 entries):
Business
Business = Business Innovation & Ideation = Innovation
Business = Economics
Business = Economics = Global Economics
My database table structure:
| id | cat | sub_cat | sub_sub_cat |
What I want to do, is insert the categories in my database by php. The separator between the cat, sub and sub_sub cat is '='. What I want to reach is a something like a loop to insert this data to my database.
Thanks in advice.
With kind regards,
Nicky
Business
be its own row with empty sub_cat and empty sub_sub_cat?