Malcolm JC Clark wrote:
I thought it would be a good idea to use parse_ini_file instead of doing
require_once("config.ini"). However, what do I do about arrays that i had in
my config file, cos parse_ini_file() does not like them. eg:

[foods]
favFoods = array('this','that','other',)

I notice my php.ini file is arranged in a similar format, and where there
are multiple options they are separated by a colon, like include_dir =
./:../ or something similar.

You can use parse_ini_file and then just explode() the ones that you need to make into an array based upon whatever separator you used.


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to