PHP extract unique elements from multidimensional array recursively
<p>I have a  multidimensional array with a specific index for each array 
to be more specific, I have a unique ip as the index and entry's as values. </p>

<p>I would like to extract recursively 1 value form each array, never 2 values from the same IP,  and display the bunch as a batch. Never the less I must display the entire set.</p>

<p>To be be a bit more clear, I must extract values from the entire set based on IP uniqueness, each batch must contain 5 values, and I must display each of the values in the list. 
The amount of IP's is never a known value. </p>

<p>for example if I have this array:</p>

<pre><code>Array
  (
    [ip] =&gt; Array
    (
        [0] =&gt; entry01


        [1] =&gt; entery02


        [2] =&gt; entery03


        [3] =&gt; entery04

    )

 [ip] =&gt; Array
     (
        [0] =&gt; entery05


     )

 [ip] =&gt; Array
     (
        [0] =&gt; entery06


     )
 )
</code></pre>

<p>My end resolute should be something like this :  </p>

<pre><code>  entery01, entery05, entery06
</code></pre>

<p>Now please notice that we still have values entery02-04 in the first array, that means that once extraction is done i must get them as well. </p>
