小编Jav*_*ish的帖子

如何按名称/时间戳排序多维数组?

我使用了"rsort"功能,通过时间戳进行排序,当阵列仅包含时间戳和不多维的.

所以现在的问题是我如何处理这个问题?

该阵列看起来像similair

Array
(
    [0] => Array
        (
            [type] => post
            [id] => 1
            [timestamp] => 2017-08-12 21:03:22
            [poster] => 1
            [profile] => 1
            [post] => Testtttttinngggs
        )

    [1] => Array
        (
            [type] => post
            [id] => 2
            [timestamp] => 2017-08-12 21:03:18
            [poster] => 1
            [profile] => 5
            [post] => Hello you
        )

    [2] => Array
        (
            [type] => post
            [id] => 3
            [timestamp] => 2017-08-12 21:03:33
            [poster] => 1
            [profile] => 1
            [post] => Somesay timestamp is screwed …
Run Code Online (Sandbox Code Playgroud)

php arrays sorting

0
推荐指数
1
解决办法
127
查看次数

标签 统计

arrays ×1

php ×1

sorting ×1