note 91271 deleted from function.parse-ini-file by danbrown

From: Date: Wed, 03 Jun 2009 12:33:04 +0000
Subject: note 91271 deleted from function.parse-ini-file by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156318@lists.php.net to get a copy of this message
Note Submitter: Bibek Paudel ---- In response to arnapou's code at: http://www.php.net/manual/en/function.parse-ini-file.php#78221 I have added a couple of lines to remove the commented part starting from # at positions other than beginning of the line http://pastebin.com/f717a8617 Features: #Read file : $ini = INI::read('myfile.ini'); #Write file : INI::write('myfile.ini', $ini); #Features : #- support [] syntax for arrays #- support . in keys like bar.foo.something = value #- true and false string are automatically converted in booleans #- integers strings are automatically converted in integers #- keys are sorted when writing #- constants are replaced but they should be written in the ini file between braces : {MYCONSTANT}

« previous php.notes (#156318) next »