mybluehair Posted November 20, 2007 Share Posted November 20, 2007 short and sweet. in my php file i want to show the time. (preferably time and date) how do i write it? i tryed something like this: "$time= NOW();" and that failed horribly. so please help. Link to comment https://forums.phpfreaks.com/topic/78039-solved-i-want-to-show-time-simple-question/ Share on other sites More sharing options...
pranav_kavi Posted November 20, 2007 Share Posted November 20, 2007 echo date('h:i:s A'); Link to comment https://forums.phpfreaks.com/topic/78039-solved-i-want-to-show-time-simple-question/#findComment-394986 Share on other sites More sharing options...
rajivgonsalves Posted November 20, 2007 Share Posted November 20, 2007 try this $today = date("F j, Y, g:i a"); print $today; more information at http://php.net/date Link to comment https://forums.phpfreaks.com/topic/78039-solved-i-want-to-show-time-simple-question/#findComment-394987 Share on other sites More sharing options...
Zeyber Posted November 20, 2007 Share Posted November 20, 2007 Heres a tutorial to answer that: http://www.w3schools.com/php/php_date.asp Link to comment https://forums.phpfreaks.com/topic/78039-solved-i-want-to-show-time-simple-question/#findComment-394998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.