<?php
$time=time();
echo 'today date is '.date('d : m : y',$time).'<br>'.'today time is '.date('H:i:s',$time).'<br>';
echo 'today date is '.date('D : M : Y',$time).'<br>'.'today time is '.date('h:i:s',$time).'<br>';
?>
output :
today date is 18 : 07 : 12
today time is 17:35:10
today date is Wed : Jul : 2012
today time is 05:35:10
note :
for every refresh of the browser ( after a second ) the seconds are changing
$time=time();
echo 'today date is '.date('d : m : y',$time).'<br>'.'today time is '.date('H:i:s',$time).'<br>';
echo 'today date is '.date('D : M : Y',$time).'<br>'.'today time is '.date('h:i:s',$time).'<br>';
?>
output :
today date is 18 : 07 : 12
today time is 17:35:10
today date is Wed : Jul : 2012
today time is 05:35:10
note :
for every refresh of the browser ( after a second ) the seconds are changing