title: I keep getting Array to string conversion error using json_decode
body: <p>I'm trying to convert a Json string in php pulled from my mySQL database. I've been successful with other strings like this using json_decode,  but for some reason when I try decoding this string:</p>
  
  <pre><code>$Json ='{"S1": "15,2,0,4,0,0,1","S2": "50,0,99,1,5,1,1,0"}';
  
  json_decode($Json, true);
  </code></pre>
  
  <p>I get the error 'Array to string conversion'. </p>
  
  <p>I've been doing the same thing successfully with this string, </p>
  
  <pre><code>[{"group":"new","users":",12345678","S1":"56,3,0,0,0,6,0","S2":"0,0,49,0,4,0,0,0","enabled":"1","admin":"1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0"}]
  </code></pre>
  
  <p>I don't know what the differences between the two are, as they both are pulled from the same database, and both validate as Json successfully.  Can someone tell me how I can successfully convert this so that I can get json_decode to work on it successfully? Thanks.</p>
  
  <p>**update: Here's the actual code I'm using</p>
  
  <pre><code>$tmpUserJson = $row['JSONSettings’];    
  
  $tmpUserJson='['.$tmpUserJson.']'; ///I’ve tried with and without brackets    
  
  echo $tmpUserJson; //returns {"S1":"15,2,0,4,0,0,1","S2":"50,0,99,1,5,1,1,0”}    
  
  $userJson = json_decode( $tmpUserJson , true);    
  
  echo $userJson['S1']; // returns Notice: Array to string conversion    
  </code></pre>