phpbar.de logo

Mailinglisten-Archive

[php] date Problem

[php] date Problem

Johannes Schmidt joh_(at)_exozet.com
Wed, 31 May 2000 16:05:44 +0200


> $date = "2000-05-31";
> $weekdate = date(w,$date);

"date" erwartet einen Zeitstempel. Versuch mal:

$date = "2000-05-30";
list($jahr, $monat, $tag) = explode("-", $date);
$weekdate = date("w",mktime(0,0,0,$monat,$tag,$jahr));
echo $weekdate;

JOh


php::bar PHP Wiki   -   Listenarchive