note 84886 added to function.parse-ini-file
| From: | david dot dyess at gmail dot com | Date: | Mon, 04 Aug 2008 07:12:13 +0000 |
| Subject: | note 84886 added to function.parse-ini-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143128@lists.php.net to get a copy of this message | ||
Here is another way to group values in the ini:
my.ini:
[singles]
test = a test
test2 = another test
test3 = this is a test too
[multiples]
tests[] = a test
tests[] = another test
tests[] = this is a test too
my.php:
$init = parse_ini_file('my.ini');
The same as:
$init['test'] = 'a test';
$init['test2'] = 'another test';
$init['test3'] = 'this is a test too';
$init['tests'][0] = 'a test';
$init['tests'][1] = 'another test';
$init['tests'][2] = 'this is a test too';
This works with the bool set to true also, can be useful with loops. Works with the bool set to true
as well.
----
Server IP: 209.41.74.194
Probable Submitter: 24.111.197.69
----
Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php
Edit -- https://master.php.net/note/edit/84886
Del: integrated -- https://master.php.net/note/delete/84886/integrated
Del: useless -- https://master.php.net/note/delete/84886/useless
Del: bad code -- https://master.php.net/note/delete/84886/bad+code
Del: spam -- https://master.php.net/note/delete/84886/spam
Del: non-english -- https://master.php.net/note/delete/84886/non-english
Del: in docs -- https://master.php.net/note/delete/84886/in+docs
Del: other reasons-- https://master.php.net/note/delete/84886
Reject -- https://master.php.net/note/reject/84886
Search -- https://master.php.net/manage/user-notes.php