-3
我正在爲音樂推廣公司製作網站。對於每一個藝術家,我有一個包含事件信息的一個單獨的陣列,像這樣:如何按時間順序排列PHP數組與關聯?
<?php
$donevents = array();
$donevents[101] = array(
"date" => "March 18th 2013",
"artist" => "Don Ross",
"venue" => "The Half Moon, Putney",
"link" => "http://www.halfmoon.co.uk",
"label" => "donross",
);
$donevents[102] = array(
"date" => "March 19th 2013",
"artist" => "Don Ross",
"venue" => "The Moon Club, Cardiff",
"link" => "http://www.themoonclub.net/",
"label" => "donross",
);
$donevents[103] = array(
"date" => "March 21st 2013",
"artist" => "Don Ross and Brooke Miller",
"venue" => "Round Midnight, London",
"link" => "http://www.roundmidnightbar.com",
"label" => "donross",
);
$donevents[104] = array(
"date" => "March 21st 2013",
"artist" => "Don Ross",
"venue" => "Masterclass at the Swindon Academy of Music",
"link" => "http://www.academyofmusic.ac.uk/locations/location.php?id=9",
"label" => "donross",
);
$donevents[105] = array(
"date" => "March 23rd 2013",
"artist" => "Don Ross",
"venue" => "Berits & Brown, Airdrie",
"link" => "http://www.intimate-gigs.com",
"label" => "donross",
);
$donevents[106] = array(
"date" => "March 25th 2013",
"artist" => "Don Ross",
"venue" => "Masterclass at The Academy of Music, Gateshead",
"link" => "http://www.guitarbar.co.uk",
"label" => "donross",
);
?>
我想所有這些不同的陣列相結合,利用包括,在一個活動頁面,並讓它們按時間順序排列。有沒有辦法做到這一點與「日期」關聯數組?
所以它最終會是這樣的: 2013年3月18日 唐·羅斯 半月,普特尼
二零一三年三月二十日 布魯克·米勒 流浪漢,布里
2013年3月29日 吉米·瓦赫勒斯廷 斯旺西的車庫
重複所有「數組排序」問題。 – 2013-02-13 17:30:52
你有沒有做過任何一種努力? – inhan 2013-02-13 17:32:03