hi guys
tell me whats the problem with this ?
<?php
class date {
var $today, $day, $month, $year;
function initialize() {
$this->today = getdate();
$this->day = $this->today['mday'];
$this->month = $this->today['mon'];
$this->year = $this->today['year'];
}
function return_day() {
if($this->day < 10 ) {
$this->day = "0".$this->day;
}
return $this->day;
}
function return_month() {
if($this->month < 10 ) {
$this->month = "0".$this->month;
}
return $this->month;
}
function return_year() {
if($this->year < 10 ) {
$this->year = "0".$this->year;
}
return $this->year;
}
};
?>
when i include it in my index.php file and then when i type http://localhost/index.php
this is the output i get
==============================================
today = getdate(); $this->day = $this->today['mday']; $this->month = $this->today['mon']; $this->year = $this->today['year']; } function return_day() { if($this->day < 10 ) { $this->day = "0".$this->day; } return $this->day; } function return_month() { if($this->month < 10 ) { $this->month = "0".$this->month; } return $this->month; } function return_year() { if($this->year < 10 ) { $this->year = "0".$this->year; } return $this->year; } }; ?>
please help me