Re: strtotime

From: Date: Sun, 10 Feb 2008 11:59:03 +0000
Subject: Re: strtotime
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269023@lists.php.net to get a copy of this message
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 That's a plain syntactical error, it's not related to strtotime(). Your variable name of '18_months_ago' is not valid in PHP. /Per Jessen, Zürich

« previous php.general (#269023) next »