I have stored in my DB a row and in that row SubCategories
it has the following
2,56,81
What I need to do is change the numbers to the correct SubCategories
ie:
1 = Sports
2 = Camping
3 = Climing
etc
I thought I would be able to do the following
$parts = explode(',', $row['SubCategories']);
But now I ran into a slight issue with how do I turn that into the words?
You’ll have to create an array with the word definitions, and then use the numbers as keys:
See it in action: http://codepad.org/vs2dJi5E