$replaces = array('replace 1', 'replace thing 2', 'third replace');
$string = '{REPLACEME} sfsfsdfsdf {REPLACEME} sdfopjsd {REPLACEME} sdfsdf {REPLACEME}';
What is the easiest way to replace each successive {REPLACEME} with the matching replace?
If there are more {REPLACEME} than replaces, it should not touch the extra {REPLACEME}'s.
So the output I would want with my example is:
replace 1 sfsfsdfsdf replace thing 2 sdfopjsd third replace sdfsdf {REPLACEME}