怎么获取指定时间段的内容,并且对应好其他数组

WBOY
Release: 2016-06-13 12:34:22
Original
806 people have browsed it

如何获取指定时间段的内容,并且对应好其他数组。
$t1=Array ( [0] => 南昌 [1] => 南昌 [2] => 赣州 [3] => 九江 [4] =>赣州  [5] => 九江) 
$t2=Array ( [0] => 2013-09-24 17:48:33  [1] => 2013-09-23 12:48:42  [2] => 2013-09-21 17:48:23  [3] => 2013-09-12 08:40:03  [4] => 2013-09-23 10:28:22  [5] => 2013-09-27 11:28:13 )

比如,我有上面两个数组。$t1【0】和$t2【0】....$t1【i】和$t2【i】是有对应关系的,$t1【0】和$t2【0】代表=====南昌,优秀。

比如,我现在想把$t2数组里面的2013-09-23 10:48:33 至 2013-09-27 11:28:13 之间的数据拿出来,组成一个新的数组,$t22.
然后把$t1里面对应的也匹配上,就是t2里面对应key删除的,t1里面也把对应的key删除。

我想得到的结果是。

$t22=Array ( [0] => 2013-09-24 17:48:33  [1] => 2013-09-23 12:48:42   [2] => 2013-09-27 11:28:13 )
$t11=Array ( [0] => 南昌 [1] => 南昌  [2] => 九江) 
得到这两个新的数组。。求过程。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!