Is there a print function for PHP that produces a valid PHP expression?
<p>I'm after a way of getting PHP to print an arbitrary array out in a form that I can include into my (test) code as an assignment.</p>

<p>print_r produces e.g:</p>

<pre><code>Array
(
[0] =&gt; qsr-part:1285
[1] =&gt; qsr-part:1286
)
</code></pre>

<p>which is almost, but not quite, valid.</p>

<p>I need e.g:</p>

<pre><code>array('qsr-part:1285', 'qsr-part:1286')
</code></pre>
