How to PHP decode JSON from MYSQL
<p>On <strong>MySQL</strong> I have this <strong>JSON</strong> value </p>

<pre><code>{"length":1847,"data":[0,0,0,0,-46,37]}
</code></pre>

<p>On <strong>PHP</strong> I need to string in array the "data" objects, so I tried:</p>

<pre><code>$json = $row['wave'];
$json_array = json_decode($json);
$json_wave = $json_array["data"];
</code></pre>

<p>It gives me <code>internal server error 500</code>, so I tried: </p>

<pre><code>var_dump(json_decode($json));
</code></pre>

<p>What I got is:</p>

<pre><code>object(stdClass)#7 (5) {
  ["length"]=&gt;
  int(1847)
  ["data"]=&gt;
  array(3694) {
    [0]=&gt;
    int(0)
    [1]=&gt;
    int(0)
    [2]=&gt;
    int(0)
    [3]=&gt;
    int(0)
    [4]=&gt;
    int(-46)
    [5]=&gt;
    int(37)
  }
}
</code></pre>

<p>I need to output this string <code>0,0,0,0,-46,37</code>, why is my code not working?</p>