PHP compares the size of two absolute times_PHP tutorial

WBOY
Release: 2016-07-13 10:39:51
Original
914 people have browsed it

Copy code The code is as follows:

$zero1=date(“y-m-d h:i: s”);
$zero2=”2010-11-29 21:07:00′;
echo “The time of zero1 is:”.$zero1.”
”;
echo “ The time of zero2 is: ".$zero2."
";
if(strtotime($zero1) echo “zero1 is earlier than zero2′;
}else{
echo “zero2 is earlier than zero1′;
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/728091.htmlTechArticleCopy the code as follows: ?php $zero1=date(“y-m-d h:i:s”); $zero2 =”2010-11-29 21:07:00′; echo “The time of zero1 is:”.$zero1.”br”; echo “The time of zero2 is:”.$...
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!