Re: storing an array in an ini file
| From: | Curt Zirzow | Date: | Tue, 13 Apr 2004 22:07:28 +0000 |
| Subject: | Re: storing an array in an ini file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183266@lists.php.net to get a copy of this message | ||
* Thus wrote David T-G (davidtg-php@justpickone.org):
> Hi, all --
>
> I have an ini file for my application and I use parse_ini_file to load it
> and some custom code to save modifications. I'd like to figure out how
> to store array values in there since that is the logical place to keep
> config data. If I can't, I could probably use a string with @@ or | in
> it as the token but an array is so much more elegant because that's what
> it's meant to do :-)
You could always serialize the array to a value. and unserialize it
after the call to parse_ini_file().
Curt
--
"I used to think I was indecisive, but now I'm not so sure."