How to insert an array in a json object in PHP
<p>I have a string on my databas, that I'm trying to insert into a json object as an Array, not a string..:</p>

<pre><code>$arrayInString = "[2,3,5,5,6]"; // this comes from the database
$jsonObject = array('numbers' =&gt; $arrayInString);
$json = json_encode($jsonObject, JSON_UNESCAPED_SLASHES);
echo $json;
</code></pre>

<p>When I execute this.. my Json object is..</p>

<pre><code>numbers: "[2,3,5,5,6]";
</code></pre>

<p>and not</p>

<pre><code>numbers: [2,3,5,5,6];
</code></pre>

<p>Like I originally wanted.. can't get this to work, can anyone help?</p>