One way is to convert array to JSON. It will convert array to string and you will be able to store it.
Anyway, I don't think that this it the right way how to deal with the problem. Say, for example, you would need to store blog entries and tags for them into database.
How you do it know?
Save blog entry and tag into one table, one row. You convert all entries tags and save all into database.
How you should do it?
Make two tables:
All info that's related to entry save into entries
. For example: title
, description
.
All tags save into entry_tags
. In that table there are id
(primary key), entry_id
(ID that have relationships with entries
ID) and tag
that simply holds the name.
I hope this will help you!