Jump to content

[SOLVED] Time (mktime)


willpower

Recommended Posts

I need to determine the current time in hh:mm:ss

 

i have the following

<?php

ini_set("date.timezone","Europe/London");

$hour=date("G");

$min=date('i');
$secs=date('s');



$newtime=date('H\:i\:s' ,mktime('$hour','$min','$secs',0,0,0));

echo $newtime;

?>

But it only returns the hour....what am i doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/64764-solved-time-mktime/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.