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