我有一个时间范围的数组,时间范围有特定的视频,我要显示与当前时间匹配的视频
我创建了一个如下所示的变量,并分配给数组,请任何人帮助我从数组中过滤当前时间的视频
ex-如果服务器时间是 2012-06-08 14:45:10 这我需要显示视频 2
$d1 = "2012-06-08 14:26:39";
$video1='http://video-js.zencoder.com/oceans-clip.mp4';
$d2 = "2012-06-08 14:39:39";
$video2='http://video-js.zencoder.com/oceans-clip.mp4';
$d3 = "2012-06-08 14:56:10";
$cc=array(
1=>array($d,$d2,$video1),
2=>array($d2,$d3,$video2)
);
//get current time
$ctime=date('Y-m-d H:i:s',time());
//need to check matched array element for current time within above array date ranges
//Ex - if the server time is 2012-06-08 14:45:10 this need show video 2