|
|
[Code] Sternzeichen berechnenSie befinden sich: Home > Webmaster News
Sternzeichen berechnen
<?php
function sternzeichen($tag, $mon) {
$tierkreis = array('Steinbock','Steinbock','Wassermann','Fische','Widder',
'Stier','Zwilling','Krebs','Löwe','Jungfrau','Waage',
'Skorpion','Schütze');
$t = array( 0 => array(mktime(0,0,0,12,22), mktime(0,0,0,12,31)),
1 => array(mktime(0,0,0,01,01), mktime(0,0,0,01,19)),
2 => array(mktime(0,0,0,01,20), mktime(0,0,0,02,18)),
3 => array(mktime(0,0,0,02,19), mktime(0,0,0,03,20)),
4 => array(mktime(0,0,0,03,21), mktime(0,0,0,04,19)),
5 => array(mktime(0,0,0,04,20), mktime(0,0,0,05,20)),
6 => array(mktime(0,0,0,05,21), mktime(0,0,0,06,21)),
7 => array(mktime(0,0,0,06,22), mktime(0,0,0,07,22)),
8 => array(mktime(0,0,0,07,23), mktime(0,0,0,08,22)),
9 => array(mktime(0,0,0,08,23), mktime(0,0,0,09,22)),
10 => array(mktime(0,0,0,09,23), mktime(0,0,0,10,23)),
11 => array(mktime(0,0,0,10,24), mktime(0,0,0,11,21)),
12 => array(mktime(0,0,0,11,22), mktime(0,0,0,12,21)));
foreach($t as $k=>$v) {
if(mktime(0,0,0,$mon,$tag) >= $v[0] && mktime(0,0,0,$mon,$tag) <= $v[1]) {
return $tierkreis[$k];
}
}
return false;
}
$sternzeichen = sternzeichen(8,10);
?>
(Autor: Wolfgang), Eingetragen am 21.07.2008
Schreib ein Kommentar
|