In PHP how do I get the number of seconds from now() until the next Sunday at midnight?
now()
I don\'t want the solution relative to a specific date, but just
Try this:
function secs_until() { $now = time(); $next = strtotime("next Sunday midnight"); return $next - $now; }