This little script should grab the valid section names from your ini file - not very robust but should get you going.

Code:

$yourIni = 'c:\blah.ini'
$sections =''
$ = open(1,$yourIni)
$line = trim(readline(1))
while @error = 0
if left($line,1) = '[' and len($line)>2
$sections = $sections + ',' + substr($line,2,len($line)-2)
endif
$line = trim(readline(1))
loop

$sections = substr($sections,2)
for each $section in split($sections,',')
? $section
next

_________________________
Eric