首页 > 解决方案 > 如何在php中获取[时间戳] ==所需日期的数组

问题描述

我有一个带有日志的文件,其中写入了这种格式的数组。

如何获取 [timestamp] 范围从 2021-05-01 到 2021-05-10 的数组?

太感谢了!

Array
(
     [event] => message
     [timestamp] => 2021-05-18
     [chat_hostname] => SN-CHAT-14_
     [message_token] => 557539925623
     [sender] => Array
         (
             [id] => swvhGP / 0WK8GmEccowg ==
             [api_version] => 10
         )

     [message] => Array
         (
             [text] => konf
             [type] => text
         )

     [silent] => 1
)
Array
(
     [event] => message
     [timestamp] => 2021-05-17
     [chat_hostname] => SN-CHAT-14_
     [message_token] => 5575369991822565
     [sender] => Array
         (
             [id] => swvhGP / 0WK4SEccowg ==
         )

     [message] => Array
         (
             [text] => www
             [type] => text
         )

     [silent] => 1
)

标签: phparraysjson

解决方案


推荐阅读