I'm a total noob concerning php and i would appreciate some help. I need to read and parse config file and save values to array of arrays. My problem is how to parse it. Conf file looks like this:
//some comments...
//some comments...
.
.
.
variable_name=variable_value
//some comments
//some comments
.
.
.
variable_name=variable_value
and so on (n times).
I need to read this file and store these three values (comments,name,value) for every variable in array ($arr1 = array ("arr2" => array ("name","value","comments"))).
Any help is welcome. Thank you.
Parsing conf file.
Moderator: General Moderators
Re: Parsing conf file.
What time of config file is this?
Whats wrong with just a normal php file with your config data.
Or even use php's style of config file a .ini file?
parse_ini_file
Whats wrong with just a normal php file with your config data.
Or even use php's style of config file a .ini file?
parse_ini_file
Re: Parsing conf file.
This is a configuration file for a search engine which runs on linux (so the file is something like name.conf). It is a pure textual file. ini file can't be used for different reasons.