Jump to content

[SOLVED] Get today's date function in php


ubuntu

Recommended Posts

Here is how you need to do it...  If you are going to do something like that you would need to come up with a timestamp...  So try this code out...

 

<?php

$date = time();

$today = date("D M d Y", $date);

echo "<font size=1>'$today'</font>\n";

?>

 

With the date function you also need to pass in a timestamp.  The time stamp is created when I called the time() function...  Try that out and it should work perfectly for you.

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.