To do this you might use the readline function & store the input strings into an array. Then parse the array strings looking for the desired entry & if found move it to the correct array location. Then write the array out. Kind of defeats the purpose of using an INI file though.
_________________________
Jack