So I wanna insert an html element that I have as a string into an existing HTML file on the server.
So I already have my string, I get a handle on the file using $handle = fopen("file.php", "rw");
and I want to add the string $content
that contains the HTML in the existing file after the div element that has the id "inner_container
".
What is the best way to do this ?
Let me know if you need code. Basically what I wanna do is insert HTML after a certain element that Id find using its id.
Thanks!