PHP Scripts

Return current date as the specific day and month

In other words, 10.10.2003 displays as "Friday October 10th 2003"

<?PHP
//getthe month variable
$mese[0]="-";
$mese[1]="January";
$mese[2]="February";
$mese[3]="March";
$mese[4]="April";
$mese[5]="May";
$mese[6]="June";
$mese[7]="July";
$mese[8]="August";
$mese[9]="September";
$mese[10]="October";
$mese[11]="November";
$mese[12]="December";

//get the day variable
$giorno[0]="Sunday";
$giorno[1]="Monday";
$giorno[2]="Tuesday";
$giorno[3]="Wednesday";
$giorno[4]="Thursday";
$giorno[5]="Friday";
$giorno[6]="Saturday";

$gisett=(int)date("w");
$mesnum=(int)date("m");
$now = ($giorno[$gisett]." ".$mese[$mesnum]." ".date("d")." ".date("Y"));
$nowm = ($mese[$mesnum]." ".date("Y"));
?>

<?php
echo $now;
// displays for example the day, month and year shown below.
echo $nowm;
//displays the month and year shown below
?>


Sunday August 01 2010

August 2010

Back