PHP preg_replace without eval
<p>Am trying to use something like:</p>

<pre><code>$newdata = preg_replace($pattern, $replacement, $data);
</code></pre>

<p>Now my replacement is something like</p>

<pre><code>$pattern = "/START(.*?)END/is";
$replacement = "START $config END";
</code></pre>

<p>Now, $config contains contents like</p>

<pre><code>array('Test\\\'s Page')
</code></pre>

<p>The problem is that after I write the content, $newdata becomes</p>

<pre><code>START array('Test\\'s Page') END
</code></pre>

<p>As you see above a single \ goes missing because it gets evaluated. How do I avoid that?</p>
