note 39176 added to function.parse-ini-file

From: Date: Mon, 19 Jan 2004 21:58:32 +0000
Subject: note 39176 added to function.parse-ini-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-63845@lists.php.net to get a copy of this message
When your keys use reserved words like ON or NO, as in a dropdown with 'Ontario' and 'Norway' in it... You can repalce this... $options = parse_ini_file("options.ini"); With the following (using pear)... require_once 'Config.php'; $config = new Config(); $source =& $config->parseConfig("options.ini", 'inicommented'); $parent = $source->toArray(); $options = $parent['root']; ---- Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39176 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39176&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39176&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63845) next »