It has been several years since I wrote PHP (career change!) -- and so I cannot figure out how to accomplish something that I know is quite simple.
I have the following file (params.ini) with a number of text variables like:
template_width=800
template_color=blue
So I open the file and put it into an array:
$master_params = file('/templates/community/params.ini');
Then I want each line to become a variable and it's value. So in the above example, PHP should know:
$template_width = "800";
$template_color = "blue";
and so on for any other lines in the params.ini file
So I have:
foreach($master_params as $one_param) {
$tlg = explode("=", $one_param);
}
So now I have everything in an array like I need it, but how can I get it out in a way that will equal?
$template_width = "800";
$template_color = "blue";
Thanks for your help. I'm really frustrated that I can't figure this out, even though I know it should be simple!