Re: strtotime

From: Date: Sun, 10 Feb 2008 11:58:55 +0000
Subject: Re: strtotime
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269022@lists.php.net to get a copy of this message
I see I broke a rule. The variable can't start with a number. Still strtotime doesn't work with -18 months How would you handle this? Ron On Sun, 2008-02-10 at 06:46 -0500, Ron Piggott wrote: > I am trying to calculate what was the date 18 months ago. When I give > the command: > > $18_months_ago = strtotime("-18 months"); > > It comes back with: > > Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE > > How would you calculate 18 months ago from today? > > Ron -- ron.piggott@actsministries.org www.actsministrieschristianevangelism.org Acts Ministries Christian Evangelism "Where People Matter" 12 Burton Street Belleville, Ontario, Canada K8P 1E6 In Belleville Phone : (613) 967-0032 In North America Call Toll Free : (866) ACTS-MIN Fax: (613) 967-9963

« previous php.general (#269022) next »