file_put_contents, placing content between lines
<p>I am new to PHP and I am practicing the file_put_contents() function, and I was wondering if this was possible.</p>

<p>I have a text file with the following copy:</p>

<pre><code>--start placed content --

(content goes here)

--end placed content --
</code></pre>

<p>Is it possible to use file_put_contents to place the content inbetween the --start-- and --end-- lines. I have tried the FILE_APPEND flag, but it always places the content after the --end-- line.  Or do I need to use file_get_contents first?</p>

<p>Thanks a lot, any help would be greatly appreciated.</p>
