Hello. I'm trying to write a PHP script that will open an HTML file, print the contents of the HTML file into a <TEXTAREA> form field, and then allow me to modify it and submit the changes so that the changes will be reflected on the file on the server.
I used the file() function to read the original file into an array, and then a for() loop to print the contents of the file array to the <TEXTAREA> field. I make changes to the file in the textarea field and then hit Submit. The changes that I made are stored into the $fileData variable and then passed into a function that prints the contents of $fileData to file. The problem is, my new file has backslashes all over the place.
If I had a line that said:
<table align="center">
there would be backslashes in front of the two quotes, even though I did not make such changes in the textarea field when I modified the file. How do I get PHP to just write the file as I told it to in the textarea field instead of putting all of these stupid backslashes all over the place?
Thanks,
-Mike