Jump to content

count how many times index apears in array


denoteone

Recommended Posts

I have been researching php.net  regain the function parse_ini_file()

 

I know you can pass it an actual ini file but what if you already saved the ini file as a string and saved the string in a variable can you pass that variable to the function?

 

I am getting the following error

[function.parse-ini-file]: failed to open stream: No such file or directory in 

 

this is how I am calling it.

 

$settings = parse_ini_file($data);

echo $settings["mac"];

Then why not build a file... use parse_ini_file, and delete the file  :shrug:

 

That's definitely a possibility.  I almost posted that, but I was speaking to, in effect: "why doesn't passing a string of data to a function that expects a filename work..."

Then why not build a file... use parse_ini_file, and delete the file

 

this is what I am going to have to do. The info is actually in a database but saved in an ini format.

 

I will get the info from the DB write it to a ini file then call the ini file so I can manipulate it. I can then resave the info in a variable and put it back in the DB.

 

I am worried about the the new lines characters.

 

Does this sound like the best way to accomplish this process? I am open to suggestions.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.