Sorry about the bad title.
First off I'm pulling a MySQL date and news articles attached to the date I have the information in an associative array.
My MySQL query is:
select year(news_date) as a year,
month(news_date) as the month,
news_content as an article
from news
order by year desc, month asc
So how do I order it in PHP from an associative array so that its grouped by year (all 2016 articles are grouped by month, all 2015 articles are grouped by month, etc.)
I'm a trainee developer and my tutor isn't here otherwise I would have asked him :)
'; }` was what i was using but it just gives me a list of dates and counts of articles in the month of that year I wanted all dates e.g. 2016, January, 2016, January, 2016, January, 2016, Febuary, how do I make it so I can seperate the years so it's like 2016 - feburary - 5 - march - 6 if you understand what I'm saying I'm not great at explaining things – user2877018 Nov 09 '16 at 15:12