Grant Grant - 1 year ago 67
PHP Question

PHP subtract 1 month from date formated with date ('m-Y')

I'm trying to subtract 1 month from a date.

$today = date('m-Y');

This gives: 08-2016

How can I subtract a month to get

Answer Source
  echo $newdate = date("m-Y", strtotime("-1 months"));


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download