I have a script that needs to load ini files and combine them to makes 1 array.
These ini files (which will always be named 'cats.ini') are in subdirectories like so:
[pre]
/root
-cats.ini
/some
/other
-cats.ini
/subdirectories
-cats.ini[/pre]
Assuming that we are starting at the deepest subdirectory, what would be the best way to recurse up to /root, stopping at each parent dir to check for and subsequently read, the cats.ini located there? My first though was having to parse the full path and strip it down one '/' everytime but I thought there might be an easier way.
I want to construct an array where the deeper ini files have presidence over the less nested files (this I sorta know how to do) by merging.
TIA