title: Add JSON array to MYSQL
body: <p>I'm trying to get specific value by array name:</p>
  
  <pre><code>&lt;?php
  $json = json_decode($_POST['json'], true);
  
  print_r($json);
  ?&gt;
  </code></pre>
  
  <p>I'm getting this varray:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; pav
              [value] =&gt; g
          )
  
      [1] =&gt; Array
          (
              [name] =&gt; ppav
              [value] =&gt; f
          )
  
      [2] =&gt; Array
          (
              [name] =&gt; kiekis
              [value] =&gt; g
          )
  
      [3] =&gt; Array
          (
              [name] =&gt; kaina
              [value] =&gt; g
          )
  
      [4] =&gt; Array
          (
              [name] =&gt; ppav
              [value] =&gt; f
          )
  
      [5] =&gt; Array
          (
              [name] =&gt; kiekis
              [value] =&gt; g
          )
  
      [6] =&gt; Array
          (
              [name] =&gt; kaina
              [value] =&gt; f
          )
  
      [7] =&gt; Array
          (
              [name] =&gt; ppav
              [value] =&gt; g
          )
  
  )
  </code></pre>
  
  <p>Tried using foreach function, but cant get specific value:</p>
  
  <pre><code>foreach ($json as $key =&gt; $value) {
      echo "name".$key['name']." value".$value['value']."&lt;br /&gt;";
  }
  </code></pre>
  
  <p>It prints all array values:</p>
  
  <pre><code>name value&lt;br /&gt;name valueasd&lt;br /&gt;name valueasd&lt;br /&gt;name values&lt;br /&gt;name values&lt;br /&gt;name values&lt;br /&gt;name values&lt;br /&gt;name valuea&lt;br /&gt;name valueasd&lt;br /&gt;name valued&lt;br /&gt;
  </code></pre>
  
  <p>But I cant select specific value by name to add to nysql. How to do that?</p>