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"];

Link to comment
Share on other sites

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.

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.