PHP Read CSV and filter by date

前端 未结 6 1948
再見小時候
再見小時候 2021-01-24 08:12

I have the following CSV

Date,Event,Description
24/01/2010,Football,Football practice for all Years.
24/01/2010,Cricket,Cricket Practice for all Years.
25/01/201         


        
6条回答
  •  有刺的猬
    2021-01-24 08:29

    The fastest (yet not optimal) way to do this is using fgetcsv and then iterate over the table, picking out those dates that are today.

    I'd probably reconsider the format of the data (make it a database), unless there are other apps depending on it.

提交回复
热议问题