note 54738 deleted from function.parse-ini-file by danbrown
| From: | danbrown@php.net | Date: | Sun, 23 Jan 2011 17:13:47 +0000 |
| Subject: | note 54738 deleted from function.parse-ini-file by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176167@lists.php.net to get a copy of this message | ||
Note Submitter: christian at thebartels dot de
----
@phpcoder:
there is another small bug in your code. in readINIfile the line
if (substr($value, 1, 1) == '"' && substr($value, -1, 1) ==
'"') {$value = substr($value, 1, -1); }
should be
if (substr($value, 0, 1) == '"' && substr($value, -1, 1) ==
'"') {$value = substr($value, 1, -1); }
(note the 0 in the first substr statement)
otherwise if you read an ini file, save it and read again the items of the array will have "
around them.