mktime have the folloing format int mktime (int hour, int minute, int
second, int month, int day, int year)

I don't understand what represent $x[stop]. maybe time in hh:mm:ss format?
if is that you ca use
$reformat_stop=explode(":",$x[stop].":"."1:1:2001")
stop=mktime($reformat_stop[0],$reformat_stop[1],$reformat_stop[2],$reformat_
stop[3],$reformat_stop[4],$reformat_stop[5])

be careful $stop is a timpstamp and you must use in combination with date()
function. look in manual for more details about function date();

--


Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Tom Beidler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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.
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to