How can I use multidimensional arrays in PHP with MySQL-based sessions?
So I started using MySQL-based sessions with session_module_name("user");
and I love it, and I might as well because I have to.
The开发者_JAVA技巧 only thing I'm missing are my beloved multidimensional arrays, and I'm at a juncture where they are most desired. How can I still use them, or is it a lost cause?
use seralize() method to convert your array data into a string representation (which is easily stored in a db). When you retrieve the data back from the db, use unseralize().
精彩评论