Forum Moderators: open
I'm trying to store an Array into a MySQL table.
This table will hold lots of different types of arrays, each with unique data types and numbers of keys. It is therefore not practical to try to break up the array into different cells.
One important thing to note is that the data in the array will not be sorted or called for by its information. Other cells with be called upon, and then the associated information in the array for that cell will be read.
I'm thinking maybe I can "flatten" out my array, similar to the print_r($array) function, but I wouldn't know how to do this to a variable, (or even if its possible or a good idea.)
Any suggestions would greatly be appreciated.
To get around some problems that can happen trying to do an insert into the table you need to clean the serialized string. An easy way to do it is to base64 encode it if you don't mind a bit of bloated data.
JAG