mktime and variables not working

From: Date: Thu, 03 Jan 2002 14:54:11 +0000
Subject: mktime and variables not working
Groups: php.general 
Request: Send a blank email to php-general+get-79324@lists.php.net to get a copy of this message
I'm trying to calculate elapsed time and I'm having trouble using mktime with variables. Here's my code; $reformat_stop = str_replace(":", ",", $x[stop]) . ",1,1,2002"; $stop=mktime($reformat_stop); I don't know how to format the code for mktime to use a variable. I keep getting -1 for $stop but if I hard code a value in mktime it works fine.

« previous php.general (#79324) next »