title: Convert 3d array to 2d array by merging data in each row
body: <p>I need to flatten my subarrays of data to form a simpler / more shallow 2-dimensional array.  Each row should become a flat, indexed array of unique values.</p>
  <p>Input array:</p>
  <pre><code>$response = [
      695 =&gt; [
          0 =&gt; [
              '00:00',
              '01:00',
              '01:30',
              '03:30',
              '04:00',
          ]
      ],
      700 =&gt; [ 
          1 =&gt; [
              '00:00',
              '00:30',
              '01:00',
              '01:30',
              '02:00',
          ],
          2 =&gt; [
              '00:00',
              '00:30',
              '09:00',
              '06:30',
              '07:00',                    
          ]
      ]
  ]; 
  </code></pre>
  <p>My current code:</p>
  <pre><code>$result = array();
  foreach ($response as $key =&gt; $list) {
    $result[$key] = array_merge($result, $list);
  }
  var_export($result);
  </code></pre>
  <p>but this doesn't give the proper result.</p>
  <p>Expected output:</p>
  <pre><code>array (
    695 =&gt; 
    array (
      0 =&gt; '00:00',
      1 =&gt; '01:00',
      2 =&gt; '01:30',
      3 =&gt; '03:30',
      4 =&gt; '04:00',
    ),
    700 =&gt; 
    array (
      0 =&gt; '00:00',
      1 =&gt; '00:30',
      2 =&gt; '01:00',
      3 =&gt; '01:30',
      4 =&gt; '02:00',
      5 =&gt; '09:00',
      6 =&gt; '06:30',
      7 =&gt; '07:00',
    ),
  )
  </code></pre>