$value) $return[$key] = object2array($value); } else { $var = get_object_vars($object); if($var) { foreach($var as $key => $value) $return[$key] = object2array($value); } else return strval($object); } return $return; } /* now lets do the rest of the parsing */ $conf = conf_parse('config.xml'); if($conf == 0) die("ERROR: Could not include or parse configuration file."); /* include the function libraries that are enabled */ $conf = obj2array($conf); foreach($conf['libraries'] as $lib) include(BASEDIR.$lib) or echo "WARNING: Could not load function library ".$lib."!"; # eof ?>