按数组值多维排序

时间:2015-02-12 03:02:21

标签: php arrays

我有这样的数组

array (size=6)
  0 => 
    array (size=1)
      0 => 
        array (size=5)
          'document_id' => string '231' (length=3)
          'document_title' => string 'Renstra 2014-2018 Distamben COVER' (length=33)
          'document_date' => string '2014-10-15 14:09:00' (length=19)
          'site' => string 'Propinsi Nusa Tenggara Barat' (length=28)
          'url_download' => string 'http://ntbprov.sip-ppid.net/index.php/document/download/231' (length=59)
  1 => 
    array (size=1)
      0 => 
        array (size=5)
          'document_id' => string '7' (length=1)
          'document_title' => string 'Data Menara 2014' (length=16)
          'document_date' => string '2015-01-08 13:05:00' (length=19)
          'site' => string 'Kabupaten Bima' (length=14)
          'url_download' => string 'http://bimakab.sip-ppid.net/index.php/document/download/7' (length=57)

如何按document_date排序?我尝试使用usort()但不工作。 我是新手。

0 个答案:

没有答案