RE: [PHP] reading file into a keyword-indexed array

2003-02-04 Thread John W. Holmes
> I would like to read and write user-settings to a keyword-value file and > be > able to extract it. The following code works fine but i wondered if there > was a more elegant/direct way of doing this. For reading, parse_ini_file() is elegant and direct. Writing is another matter. If you are ge

[PHP] reading file into a keyword-indexed array

2003-02-04 Thread Durwood Gafford
I would like to read and write user-settings to a keyword-value file and be able to extract it. The following code works fine but i wondered if there was a more elegant/direct way of doing this. -Durwood $file = "user_settings.txt"; // Read user settings from file if it exists, otherwise set to