How to replace same instance of string in a string with an array?
<pre><code>$replaces = array('replace 1', 'replace thing 2', 'third replace');

$string = '{REPLACEME} sfsfsdfsdf {REPLACEME} sdfopjsd {REPLACEME} sdfsdf {REPLACEME}';
</code></pre>

<p>What is the easiest way to replace each successive <code>{REPLACEME}</code> with the matching replace?</p>

<p>If there are more <code>{REPLACEME}</code> than replaces, it should not touch the extra <code>{REPLACEME}</code>'s.</p>

<p>So the output I would want with my example is:</p>

<pre><code>replace 1 sfsfsdfsdf replace thing 2 sdfopjsd third replace sdfsdf {REPLACEME}
</code></pre>
