Jump to content

PHP Date Format Help


kamal213

Recommended Posts

Hi guys I have this date script below which displays like so: 16/09/2011.

 

Its fine but I now like it to display like this: 16 September 2011

 

Please I need help in twicking the code to do this Thanks!

 

<?php
//check to see if passing variable is set i.e. if true get day, month, year.
if(isset($_GET['day'])){
$day = $_GET['day'];
} else{
//Get today's date and put them in date, month, year
$day = date("d");
}
if(isset($_GET['month'])){
$month = $_GET['month'];
} else{
$month = date("m");
}
if(isset($_GET['year'])){
$year = $_GET['year'];
} else{
$year = date("Y");
}

echo $day."/".$month."/".$year;

?>

Link to comment
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.