@Hawkee do you believe there is a way to do exactly this think with smaller code? Are there any tweeks can be made to this code? What's your opinion?\
Think about an Active Listening Server with PHP, And in the other side a Web PHP Page. Now Lets say the PHP Page is our Settings Page, and the other part is our Server. Modifying the INI File through our Web Page would change our ini file. Though if we had loaded the whole ini file into our memory through our server, it wouldn't gonna read the new values. It would be with an out of date config.
I get it though, in some other apps, would be more useful to save it in an array , in order to make unlimited queries with less processing and reading time. This particular script can be modified to allow caching the data to a permanent array. When i find some free time, i will give it a try.
Looks like your'e just doing a linear search which should be fine for your purposes. I'm sure there are more advanced methods, but this should suffice.