tags:

views:

48

answers:

1
// why does this not work PHP in XAMMP stack
// error: "strtotime is not defined"

$date2 = strtotime('2010-10-01');
+1  A: 

According to http://us3.php.net/manual/en/calendar.installation.php,

To get these functions to work, you have to compile PHP with --enable-calendar.

The Windows version of PHP has built-in support for this extension. You do not need to load any additional extensions in order to use these functions.

or on OS X:

sudo port install php5-calendar

Failing that, try looking for php5-calendar in your system's package manager.

Michael Butler
of course it help if you are in php tags not script tags -duh
roger rover
although you accepted my answer, it is probably not the solution. I incorrectly was looking at the PHP Calendar package, not the Date/Time package, which is built in to pretty much all PHP installations.
Michael Butler