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; ?> Quote 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! Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.