WordPress php循环CPT将值与数组中的上一项进行比较

时间:2016-04-19 07:29:23

标签: php arrays wordpress loops

我查询我的所有订单并循环遍历1 bye 1,这就是打印的样子:(仅复制1个订单)这是1 $order的转储

Array
(
    [0] => Array
        (
            [attractie] => WP_Post Object
                (
                    [ID] => 41
                    [post_author] => 1
                    [post_date] => 2016-02-29 14:30:33
                    [post_date_gmt] => 2016-02-29 14:30:33
                    [post_content] => Content
                    [post_title] => Title
                    [post_excerpt] => 
                    [post_status] => publish
                    [comment_status] => closed
                    [ping_status] => closed
                    [post_password] => 
                    [post_name] => post-name
                    [to_ping] => 
                    [pinged] => 
                    [post_content_filtered] => 
                    [post_parent] => 0
                    [menu_order] => 0
                    [post_type] => attracties
                    [post_mime_type] => 
                    [comment_count] => 0
                    [filter] => raw
                )

            [start] => 0930
            [end] => 1200
            [personen] => 8
        )

)

现在我的目标是检查每个start的{​​{1}}和end小时,看看是否有吸引力相互重叠,订单可以有多个{{1} }。

所以,这是我尝试过但我总是得到结果attractie

attracties

0 个答案:

没有答案