Jump to content

[SOLVED] Need help with date and time.


Chaori

Recommended Posts

I know date can be done like:

echo date(H) . ":" . (j) . ":" . (s);

but how do I assign the current time and date to variables?

 

I know the following code doesn't work, I'm just using it as an example for what I want to do..

$time='(H) . ":" . (i) . ":" . (s)';
$date='(j) . "/" . (m) . "/" . (y)';

 

If anyone understands what I mean can you tell me how I assign $time and $date? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/136199-solved-need-help-with-date-and-time/
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.