1. Calculate the time n days after the current time $info = (new DateTime ($nowDate))->add (New DateInterval ("p{$days}d"))->format (' y-m-d '); 2. According to a given time to get a day is a few $weekarray=array ("Days", "one", "two", "three", "four", "five", "six"); Echo "Week". $weekarray [Date ("W", "2015-11-26")];3. Two-dimensional array sorting $data = Array (); $data [] = Array (' volume ' = +, ' edition ' = 2); $data [] = Array (' volume ' = +, ' edition ' = 1); $data [] = Array (' volume ' = =, ' edition ' = 6); $data [] = Array (' volume ' = = 98, ' edition ' = 2); $data [] = Array (' volume ' = +, ' edition ' = 6); $data [] = Array (' volume ' = +, ' edition ' = 7); Get the list of columns foreach ($data as $key + = $row) { $volume [$key] = $row [' volume ']; $edition [$key] = $row [' Edition ']; } Array_multisort ($volume, Sort_desc, $edition, SORT_ASC, $data); 4. Array de-re-empty $newdata = Array_unique (Array_filter ($ OldData));