PHP - read date results and add style at different
<p>I have the following set of results from a query:</p>

<pre><code>name        date_added
----        ---------
dan         15/11/2012
jane        15/11/2012
ted         14/11/2012
larry       13/11/2012
corben      13/11/2012
</code></pre>

<p>These results are from a simple MySQL query and I display the results e.g.</p>

<pre><code>while($users = mysql_fetch_array($result)){

    echo $users[name].' -- '.$users[date_added];

}
</code></pre>

<p>This produces a simple list e.g.</p>

<pre><code>dan    --     15/11/2012
jane   --     15/11/2012
ted    --     14/11/2012
larry  --     13/11/2012
corben --     13/11/2012
</code></pre>

<p>What I want to do is the head the results with the different dates, starting with the first one, e.g.</p>

<pre><code>15/11/2012
dan    --     15/11/2012
jane   --     15/11/2012

14/11/2012
ted    --     14/11/2012

13/11/2012
larry  --     13/11/2012
corben --     13/11/2012
</code></pre>

<p>The dates change daily as this is a living document so nothing is hard coded.</p>

<p>Is there a simple and efficient way to do this within the while loop?</p>
