title: how to duplicate parent values in multidimensional array?
body: <p>I have an multidimensional array like this Array.</p>
  <pre><code>$array = array(
             'parent1' =&gt; 'id',
             'parent2' =&gt; 'pw',
             'list' =&gt; array(
                 array(
                     'child1' =&gt; 'value1',
                     'chlid2' =&gt; 'value2'
                 ),
                 array(
                     'child1' =&gt; 'value3',
                     'chlid2' =&gt; 'value4'
                 )
             ),
            'parent3' =&gt; 'addr'
          );
  
  </code></pre>
  <p>I want to make an array of the top keys and values repeatedly in PHP.
  I want Output Like Below.
  The order is irrelevant.</p>
  <pre><code> $result = array(
          array(
           'parent1' =&gt; 'id',
           'parent2' =&gt; 'pw',
           'child1' =&gt; 'value1',
           'chlid2' =&gt; 'value2',
           'parent3' =&gt; 'addr'
          ),
           array(
           'parent1' =&gt; 'id',
           'parent2' =&gt; 'pw',
           'child1' =&gt; 'value3',
           'chlid2' =&gt; 'value4'
           'parent3' =&gt; 'addr'
          )
       );
  </code></pre>