0

I have a .ini file as follows:

[playlist]
numberofentries=2
File1=http://87.230.82.17:80
Title1=(#1 - 365/1400) Example Title
Length1=-1
File2=http://87.230.56.25:80
Title2=(#2 - 370/1400) Example Title
Length1=-1
Version=2 

I would like to know how I can programmatically read this file in, add quotes around the file and title values and then save this file again in PHP.

I would greatly appreciate any help.

RyanDreggs
  • 196
  • 5
  • 16

1 Answers1

5

You need to use escaping when writing " into a file, using '\" will be sufficient. For writing and reading .ini files, I suggest you looking at the two linked resources.

Community
  • 1
  • 1
Whisperity
  • 3,012
  • 1
  • 19
  • 36