php数组按时间排序,按日期时间在PHP中对数组中的数组进行排序
我目前在
PHP中有一個問題,我想按照創建日期對這些帖子進行排序,以便它們可以按降序顯示.我一直在尋找一個PHP函數來做到這一點,但沒有運氣.
有一個簡單的解決方案嗎?任何想法將不勝感激:)
array
0 =>
array
'post_id' => string '1' (length=1)
'user_id' => string '3' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
1 =>
array
'post_id' => string '2' (length=1)
'user_id' => string '2' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
2 =>
array
'post_id' => string '3' (length=1)
'user_id' => string '5' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
總結
以上是生活随笔為你收集整理的php数组按时间排序,按日期时间在PHP中对数组中的数组进行排序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 猿题库有电脑版吗(猿题库有没有电脑版的)
- 下一篇: app 应用商店系统php,GitHub