I’d like to store associative array containg mostly strings and integers as values in db.
I was thinking:
- implode/explode – need to find delimiter, which won’t be in values – since it’s almost user generated, not safe
- XML – feels to heavy for the job (creating/reading values)
- json – if i need only to work with
json_decode/json_encode, seems perfect
What do you think?
Please, do not forward me to other questions like this on SO, I’ve read most of them and I’m still not sure 🙂
I think serialize:
http://php.net/manual/en/function.serialize.php