Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php compare two dates

$today = date("Y-m-d");
$expire = $row->expireDate; //from database

$today_time = strtotime($today);
$expire_time = strtotime($expire);

if ($expire_time < $today_time) { /* do Something */ }
 
PREVIOUS NEXT
Tagged: #php #compare #dates
ADD COMMENT
Topic
Name
6+9 =