Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/29/2022 in all areas

  1. when you fetch and index/pivot the data, index it by both the year and the month - $data = []; foreach ($results as $result) { $data[$result->Year][$result->Month][] = $result; } to produce the output - foreach($data as $year=>$arr) { // start a new year section here... echo "<h3>$year</h3>"; foreach($arr as $month=>$rows) { // start a new month section here... $monthName = date('F', mktime(0, 0, 0, $month, 10)); echo "<h4>$monthName</h4>"; foreach($rows as $row) { // output the data under each month here... echo "<p>$row->Title</p>"; } } }
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.