I have this pretty ordinary Mozilla like preferences file:
system_pref("system.auto_update", true);
system_pref("data.current_level", 1);
syste_pref("data.current_message", "this is a test, a good one");
Want to be able to extract the value for any given variable.
function readconfig($config, $value){
$configdat = file("$this->configfile","w");
for($i = 0; $i < sizeof($configdat); $i++) {
// Find thee config line
preg_match ("/$config/i", "$configdat[$i]", $result);
if (!$result[0])
continue;
// ???????????????
}
}
Can anyone help me get the rest of the way?
Note the value if a string is in "", and if true/false, or numeric value is not.
How does one do this?