Convert an array of dates into a date range
<p>I have an array of dates: from and to 's.
i.e:</p>

<pre><code>array(
    [0] =&gt; array('from' =&gt; '19-01-2000' 'to' =&gt; '20-01-2000')
    [1] =&gt; array('from' =&gt; '20-01-2000' 'to' =&gt; '21-01-2000')
    [2] =&gt; array('from' =&gt; '21-01-2000' 'to' =&gt; '22-01-2000')
    [3] =&gt; array('from' =&gt; '23-01-2000' 'to' =&gt; '24-01-2000')
    [4] =&gt; array('from' =&gt; '24-01-2000' 'to' =&gt; '25-01-2000')
)
</code></pre>

<p>I am trying to find a way to convert create a new array which will only have the date ranges, 
i.e:</p>

<pre><code>array(
    [0] =&gt; array('from' =&gt; '19-01-2000' 'to' =&gt; '22-01-2000')
    [1] =&gt; array('from' =&gt; '23-01-2000' 'to' =&gt; '25-01-2000')
)
</code></pre>

<p>Any suggestions?</p>
