I have a text file like this:
// Some comment here
$variable = "something";
$variable2 = "another";
I want to read the file with PHP, and strip the variable from the string, grabbing everything between the quotes. I would then use that as a default value in a HTML form that a user can edit. Once the user submits the form, I would want to rewrite the new value to that text file.
Is this easily done with a function?
I'm having trouble extracting the value of the variable and ignoring the comment lines. :queasy: