I'm trying to edit my config.php file from the website. There are 12 or so variables on this page. Here's what I have:
$fcontents = file ('./config.php');
while (list ($line_num, $line) = each ($fcontents)) {
$configlines[$line_num] = explode(" = ",$line);
}
foreach ($configlines as $key=>$value) {
echo $key.' '.$value[0].' '.$value[1].'<br>';
}
All the lines get loaded and spliced using the '='. I am having trouble getting rid of the quotes - "" - around the values for the variables. I imagine I'll have trouble down the road trying to write the file out too, with inserting the quotes again and perhaps with the $ as well? Any ideas?
Thanks!