Aus einem XML lese ich nun das Vergleichs Datum aus.
$today = 20.05.2010
$lastday = 10.06.2010
$xmlday = 25.05.2010
Folgendes If geht einfach nicht
PHP-Code:
if($today <= $xmlday && $xmlday <= $lastday)
Christian
if($today <= $xmlday && $xmlday <= $lastday)
function timestampFromString($str){
$werte = explode(".", $string);
return mktime($werte[1], $werte[0], $werte[2]);
}
if(timestampFromString("01.01.1970") < timestampFromString("02.01.1970")) echo "Wert 1 war früher";
Einen Kommentar schreiben: