title: Map two arrays key and value to create json object in php
body: <p>Hi guys I'm trying to map key with values in PHP to create JSON object, can someone help please.</p>
  
  <p>My keys array:</p>
  
  <pre><code>[
      "ID",
      "NAME",
      "PRICE",
      "TYPE"
  ]
  </code></pre>
  
  <p>My values array:</p>
  
  <pre><code>[
     [
          "1",
          "Chicken Royal",
          "25",
          "Sandwich"
      ],
      [
          "2",
          "Beef Whopper",
          "30",
          "Burger"
      ],
      [
          "3",
          "Beef Royal",
          "30",
          "Burger"
      ]
  ]
  </code></pre>
  
  <p>What I'm looking for is:</p>
  
  <pre><code>[
      "ID":"1",
      "NAME":"Chicken Royal",
      "PRICE":"25",
      "TYPE":"Sandwich"
  ]
  </code></pre>
  
  <p>I've used this function</p>
  
  <pre><code>$result = array_map( function($k,$v) { return array('column' =&gt; $k,'value' =&gt; $v); }, array_keys($columnNames),$values);
  </code></pre>