您好,登錄后才能下訂單哦!
1.根據當前時間計算N天后的時間 $info = (new DateTime($nowDate))->add(new DateInterval("P{$days}D"))->format('Y-m-d’); 2.根據一個指定的時間獲取改天是周幾 $weekarray=array("日","一","二","三","四","五","六"); echo "星期".$weekarray[date("w","2015-11-26")]; 3.二維數組排序 $data = array(); $data[] = array('volume' => 67, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 1); $data[] = array('volume' => 85, 'edition' => 6); $data[] = array('volume' => 98, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 6); $data[] = array('volume' => 67, 'edition' => 7); // 取得列的列表 foreach ($data as $key => $row) { $volume[$key] = $row['volume']; $edition[$key] = $row['edition']; } array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data); 4.數組去重去空 $newData = array_unique(array_filter($oldData));
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。