function second_statistics($strs){
$minute=0;
if($strs){
$patterns = "/(\d+)时/";
preg_match_all($patterns,$strs,$zzTime);
$Time=isset($zzTime[1][0])?$zzTime[1][0]:0;
$patterns = "/(\d+)分/";
preg_match_all($patterns,$strs,$zzTimeFen);
$TimeFen=isset($zzTimeFen[1][0])?$zzTimeFen[1][0]:0;
$patterns = "/(\d+)秒/";
preg_match_all($patterns,$strs,$zzTimeMiao);
$TimeMiao=isset($zzTimeMiao[1][0])?$zzTimeMiao[1][0]:0;
$minute=$Time*60*60+$TimeFen*60+$TimeMiao;
}
return $minute;
}
$v_time_zhibo="00时21分20秒";
$v_time_zhibo_sec=second_statistics($v_time_zhibo);
版权声明:除特别声明外,本站所有文章皆是本站原创,转载请以超链接形式注明出处!