Reverse order of foreach list items

后端 未结 8 1515
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 16:31

I would like to reverse the order of this code\'s list items. Basically it\'s a set of years going from oldest to recent and I am trying to reverse that output.



        
8条回答
  •  死守一世寂寞
    2020-12-02 17:09

    If your array is populated through an SQL Query consider reversing the result in MySQL, ie :

    SELECT * FROM model_input order by creation_date desc
    

提交回复
热议问题