WowAddict Posted January 14, 2010 Share Posted January 14, 2010 <?php $datestring = ""; $now = time(); $datestring .= "<p>Seconds since Jan 1, 1970: $now</p>"; $datestring .= "<p>Today's date: " . date("Y-m-d",$now)"</p>"; echo $datestring; ?> Link to comment https://forums.phpfreaks.com/topic/188409-need-help-with-date-thingy/ Share on other sites More sharing options...
MatthewJ Posted January 14, 2010 Share Posted January 14, 2010 Yep, that's php alright! Link to comment https://forums.phpfreaks.com/topic/188409-need-help-with-date-thingy/#findComment-994656 Share on other sites More sharing options...
oni-kun Posted January 14, 2010 Share Posted January 14, 2010 It seems you forgot a concatinating operator in your string after 'date("Y-m-d",$now)"' $datestring = ""; $now = time(); $datestring .= "<p>Seconds since Jan 1, 1970: $now</p>"; $datestring .= "<p>Today's date: " . date("Y-m-d",$now) . "</p>"; echo $datestring; This will work. Link to comment https://forums.phpfreaks.com/topic/188409-need-help-with-date-thingy/#findComment-994657 Share on other sites More sharing options...
WowAddict Posted January 14, 2010 Author Share Posted January 14, 2010 Thank YOU!!! Obviously I miss the simple thing ...lol :D Link to comment https://forums.phpfreaks.com/topic/188409-need-help-with-date-thingy/#findComment-995026 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.