[Solved] How to get the difference in seconds in PHP?


$now = "2014-11-12 20:20:40";
$delayed_time = "2014-11-12 20:21:00";
$diff = strtotime($delayed_time) - strtotime($now); // $diff = 20;

solved How to get the difference in seconds in PHP?