Take the 2-minute tour ×
// why does this not work PHP in XAMMP stack
// error: "strtotime is not defined"

$date2 = strtotime('2010-10-01');
share|improve this question
Is that your whole script? –  Dumb Guy Aug 12 '10 at 2:15

1 Answer 1

up vote 1 down vote accepted

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



or on OS X:

sudo port install php5-calendar

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

share|improve this answer
of course it help if you are in php tags not script tags -duh –  roger rover Aug 12 '10 at 2:19
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 Aug 12 '10 at 3:47

Your Answer


