php: possible to convert array of numbers to 'from' and 'to' pairs where consecutive?
<ul>
<li>I have an array of timestamps referring to the days when a holiday home is booked.   </li>
<li>each timestamp is a round day.</li>
<li>I want to turn this into an array of 'begins' and 'ends' pairs for consecutive dates</li>
</ul>

<p>Are there any php functions I should be aware of for writing this function?</p>

<p>Or does anyone have any pointers for this kind of thing?</p>

<p>thanks!</p>

<p>edit:</p>

<p>example array:</p>

<pre><code>Array
(
    [0] =&gt; 1273536000
    [1] =&gt; 1273622400
    [2] =&gt; 1273708800
    [3] =&gt; 1273795200
    [4] =&gt; 1273881600
    [5] =&gt; 1273968000
    [6] =&gt; 1274054400
    [7] =&gt; 1274140800
    [8] =&gt; 1274227200
)
</code></pre>

<p>where a day = 86400 (seconds)</p>
