Try this:
$now_ts = strtotime($now);
$then_ts = strtotime($then);
$days_diff = 0;
while ($now_ts > $then_ts) {
$now_ts = strtotime('-1 day', $now_ts);
$days_diff++;
}
or this:
$now_arr = explode('-', $now);
$then_arr = explode('-', $then);
$now_jd = cal_to_jd(CAL_GREGORIAN, $now_arr[1], $now_arr[2], $now_arr[0]);
$then_jd = cal_to_jd(CAL_GREGORIAN, $then_arr[1], $then_arr[2], $then_arr[0]);
$days_diff = $now_jd - $then_jd;