我需要你的帮助,如何在以下数组中减去last_modified和final_manuscript_date:
Array (
[chapters_id] => 10736
[last_modified] => 2010-12-21 15:01:55
[steps_id] => 3
[sub_step_id] => 0
[steps_position] => 1
[final_manuscript_date] => 2010-09-27
)那么在这种情况下,我可以得到一个介于2010-12-21和2010-09-27之间的N天的值吗?
发布于 2012-01-03 21:08:58
你就不能简单地这么做:
$diff = strtotime($arr["final_manuscript_date"]) - strtotime($arr["last_modified"]);
$days = $diff / 84600; // to get # of days, you can round them off or use ceil/floorhttps://stackoverflow.com/questions/8712735
复制相似问题