there is a bunch of examples to parse the ini files in PHP. You can even do one on your own:
1. loop every line 2. if format is [**] then this is the key 3. everything till the empty line is a key = value pair P.S: please, when replying click on "new email" and cut&paste the email address. If you click "reply-to" and change the "to" and "body" to your own so it looks like a new post, some of us still get it as a thread of the previous one. -- Maxim Maletsky [EMAIL PROTECTED] "Erich C. Beyrent" <[EMAIL PROTECTED]> wrote... : > Hey everybody, > > I'm new the list and to PHP, so I thought I'd launch right in with a > question. > > I have a file which contains the following syntax: > > ; Events listings > [event] > month = january > day = 23 > year = 2003 > venue = some club > description = this is an event > > [event] > month = january > day = 12 > year = 2003 > venue = another club > description = this is another event > > Each one of these headers sections represents the start of a new event. So, > my code does the following: > > $EVENTS = parse_ini_file('./data/events', TRUE); > while($key = key($EVENTS)) > { > $$key = current($EVENTS); //variable variables > next($EVENTS); > } > > The problem is that when I try to print the values for $venue, $day, etc, I > only get the values for the last section encountered. I need a way to get > the values of all the events - do my section heads need to be unique, or can > I continue to use the same format in my ini file? > > Thanks in advance! > > -Erich- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php