How to concate array elements on value basis in php
<p>I have array like this :</p>

<pre><code>Array
(
    [attribute] =&gt; Array
        (
            [0] =&gt; sku
            [1] =&gt; sku
            [2] =&gt; attribute_set_id
        )

    [value] =&gt; Array
        (
            [0] =&gt; 1, 2, 3
            [1] =&gt; 3, 4
            [2] =&gt; 4
        )

)
</code></pre>

<p>In the above array attributes are like keys and values are values .I want to  concatenate same key values like here  required <code>sku</code> will be <code>(1,2,3,4)</code>. I can join them by combine array.The result array will be like</p>

<pre><code>array('sku'=&gt;'1,2,3,4',attribute_set_id=&gt;'4'); 
</code></pre>

<p>The above array will be dynamic.</p>
