Converting a string of JS Array to PHP array
<p>I have a string (in PHP) representing a JS array, and for testing purpose would like to convert it to a PHP array to feed them into a unit test. Here's an example string</p>

<pre><code>{ name: 'unique_name',fof: -1,range: '1',aoe: ',0,0,fp: '99,desc: 'testing ability,image: 'dummy.jpg'}
</code></pre>

<p>I could use a explode on the "," then on the colon, but that is rather inelegant. Is there a better way?</p>
