I need to sort the multidimensional array with output by value. I can not group the nested arrays by date and output it with the title (date). There is an array:
Array (
[0] => (
[ID] => 959
[title] => title
[post_date] => 2018-01-01 10:17:49
)
[1] => (
[ID] => 960
[title] => title
[post_date] => 2018-01-01 10:17:49
)
[2] => (
[ID] => 961
[title] => title
[post_date] => 2018-01-02 10:17:49
)
[3] => (
[ID] => 962
[title] => title
[post_date] => 2014-01-02 10:17:49
)
[4] => (
[ID] => 963
[title] => title
[post_date] => 2014-01-03 10:17:49
)
)
As a result, I need to get this. There is a date as the header and all arrays in which this date.
Result
- 2018-01-01 -
id: 959 Title
id: 560 Title
- 2018-01-02 -
id: 961 Title
id: 562 Title
- 2018-01-02 -
id: 963 Title
.....