I have a mysql query in which I group each post by the date is was posted. I want to be able to echo the amount of posts that happened each day, know a way?
Here is what I've written so far which does post a new <div> for each day it was posted. 
$trendQuery = "
SELECT DATE(timestamp) AS ForDate,
    COUNT(*) AS NumPosts
 FROM   trends
 WHERE `trend` = '" . $_GET['graph'] . "'
 GROUP BY DATE(timestamp)
 ORDER BY ForDate
";
$result = mysql_query($trendQuery);
    while ($row = mysql_fetch_array($result)) {
        echo'
        <div>
            <p>Here is where I want to say how many posts that happened!</p>
    </div>
    ';
}
 
     
    