title: Give json data in php
body: <p>I want insert in two-column database data <code>woid</code> and <code>json_data</code>, i can not getting value <code>json_data</code> for inset in database, How is it?</p>
  
  <pre><code>$data_end = json_decode('[
    {
      "woid": "2254271",
      "json_data": [
        {
          "code": "23",
          "date": "Tue, 03 Jan 2017 03:30 PM IRST",
          "temp": "68",
          "text": "Breezy"
        }
      ]
    },
    {
      "woid": "2254271",
      "json_data": [
        {
          "code": "23",
          "date": "Tue, 03 Jan 2017 03:30 PM IRST",
          "temp": "68",
          "text": "Breezy"
        }
      ]
    }
  ]');
  
  foreach($data_end as $idx=&gt;$val){
    $this-&gt;admin_model-&gt;UpdateData('weather', array('json_data' =&gt; $val-&gt;json_data), array('woid' =&gt; $val-&gt;woid));
  }
  </code></pre>
  
  <p>And give me this error:</p>
  
  <blockquote>
    <p>A PHP Error was encountered<br> Severity: Notice<br> Message: Array to
    string conversion<br> Filename: database/DB_driver.php<br> Line
    Number: 1524<br> <br><br> Error Number: 1054<br> Unknown column
    'Array' in 'field list'<br> UPDATE <code>weather</code> SET <code>json_data</code> = Array
    WHERE <code>woid</code> = '2254271'<br> Filename: models/model.php<br> Line
    Number: 39<br></p>
  </blockquote>