I'd like to store associative array containg mostly strings and integers as values in db.
I was thinking:
json_decode/json_encode, seems perfectWhat 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
You could either serialize() the array, or json_encode() it when writing to the database, and json_decode() when fetching from the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With