All right so I have a problem and I'm looking for the best way to model it.
At the moment I have an array called $lang and it is defined in multiple files. It is initialized as so in each file: $lang = array_merge($lang, array( "Key" => "Value", )); so that when multiple files are included on a page, the $lang array contains all keys and values from their respective files into one big array.
Now I want to build a front-end where it displays all of the attributes from the array, a user can change the attributes, and save them. At the moment I am including them as so:
foreach(glob("language/*.php") as $filename){
include $filename;
}
I display them all fine, but when I want to re-submit them as a form, I don't know how to specify which Key => Value belonged to which file, as they were all merged when they were included.
Is there some clever way I can differentiate which file a certain Key => Value belonged to as I have set it up right now, or should I step back and set up the model differently?