Results 1 to 5 of 5
Thread: Need help with strtotime()
-
08-29-2006, 02:01 PM #1Junior Guru
- Join Date
- Jul 2002
- Posts
- 183
Need help with strtotime()
Code:<? $caldate = $_REQUEST['eventid']; $timestamp = strtotime('$caldate'); echo date('n/j/Y D', $timestamp); ?>
-
08-29-2006, 02:06 PM #2Web Hosting Master
- Join Date
- Nov 2003
- Posts
- 691
PHP Code:<?= date('n/j/Y D', strtotime($_REQUEST['eventid'])); ?>
-
08-29-2006, 07:13 PM #3Web Hosting Master
- Join Date
- Mar 2006
- Posts
- 984
Hum, look at that - another 1969 bug issue.
-
08-29-2006, 07:14 PM #4Web Hosting Master
- Join Date
- Nov 2003
- Posts
- 691
Actually the problem is expecting PHP parse a variable in single-quotes, which it doesn't.
-
08-30-2006, 01:54 AM #5Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
Change
$timestamp = strtotime('$caldate');
To
$timestamp = strtotime($caldate);