----- Original Message -----
From: "Marcus Gnaß" <gonatan@xxxxxx>
To: "Gustav Wiberg" <gustav@xxxxxxxxxxxxxx>
Sent: Wednesday, March 01, 2006 5:24 PM
Subject: Re: About date & time...
Gustav Wiberg schrieb:
function currenttime() {
$t = date('h\:\ i\:\ s');
$returnTime = str_replace(" ", "", $t);
return $returnTime;
}
function currentdate() {
$d = date('Y\-\ m\-\ d');
$returnDate = str_replace(" ", "", $d);
return $returnDate;
}
Although beeing a totally noob to PHP I suggest this instead:
function currenttime() {return date('H\:i\:s');}
function currentdate() {return date('Y\-m\-d');}
Marcus
Why?
return date('H\:i\:s') doesn't work as expected... :-)
/G
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php