Forum Moderators: coopster
I'm currently writing these out to ini files. However, I'm not quite clear if it's possible to write an ini file that's equivalent to an array more than 2 levels deep.
Is there any php function that does the reverse of the parse_ini_file function, taking an array and turning it into an ini file?
I was also considering serializing these arrays and putting them in a DB-- are there any pros and cons to these approaches?
Thanks!
However, I'm not quite clear if it's possible to write an ini file that's equivalent to an array more than 2 levels deep.
Not with the existing ini functions. You would likely need to roll your own code to build any deeper.
reverse of the parse_ini_file function
No, not built-in anyway. Again, you would likely need to write your own.
serializing
Always an option. But it may be just as simple to map the column names in the database table rather than serialize them and store them.