title: how to get an array of unique key and associated value from multidimensional array with multiple keys and values
body: <p>I'm firing a query on a particular table and getting this result :</p>
  
  <pre><code>        $results = array(3) {
            [0]=&gt;
            array(2) {
              ["category"]=&gt;
              string(1) "1"
              ["manufacturer"]=&gt;
              string(1) "2"
            }
            [1]=&gt;
            array(2) {
              ["category"]=&gt;
              string(1) "1"
              ["manufacturer"]=&gt;
              string(1) "9"
            }
            [2]=&gt;
            array(2) {
              ["category"]=&gt;
              string(1) "1"
              ["manufacturer"]=&gt;
              string(2) "10"
            }
          }
  </code></pre>
  
  <p>I have tried many solutions like :</p>
  
  <pre><code>        $temp = array();
          foreach ($results as $result) {
              foreach ($result as $key =&gt; $value) {               
                   $data = array_merge($temp[$key], $value);
              }
          }
  
      foreach ($results as $result) {
                  foreach ($result as $key =&gt; $value) {
                      array_push($temp[$result], $value);
                  }
              }
  </code></pre>
  
  <p>I want the value of category as indexes of array and value of manufacturer as array of associated category (index). As shown below :</p>
  
  <pre><code>$array = array(1) {
  [1]=&gt; array(3) {
       2,9,10
       }
  };
  </code></pre>