config[$section][$item] = trim($matches[2]); } } } return $this->config; } function get_ini_string($file) { $content = ''; foreach($this->config as $section => $data) { $content .= "[$section]\n"; foreach($data as $item => $value) { if($value != '') { $value = trim($value); $item = trim($item); $content .= "$item=$value\n"; } } } return $content; } } ?>