Jump to content

[SOLVED] Simple strtotime() error.


kernelgpf

Recommended Posts

Oh, duh. Sorry. But that's only 5 months, not 6?

Understandably, you're thinking of that because you formatted your date wrong.

 

$today=date('m/d/y');
$time="6 MONTHS";
$expires = date('m/d/y', strtotime("$today + $time"));
echo "$today and $expires";

 

See what that echos out. It should look right to you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.