Home > php教程 > php手册 > php比较两个绝对时间的大小

php比较两个绝对时间的大小

WBOY
Release: 2016-06-06 20:25:10
Original
1416 people have browsed it

这篇文章主要介绍了php比较两个绝对时间的大小,,需要的朋友可以参考下

复制代码 代码如下:


$zero1=date(“y-m-d h:i:s”);
$zero2=”2010-11-29 21:07:00′;
echo “zero1的时间为:”.$zero1.”
”;
echo “zero2的时间为:”.$zero2.”
”;
if(strtotime($zero1) echo “zero1早于zero2′;
}else{
 echo “zero2早于zero1′;
}
?>

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template