1978年腊月十八出生属马人的星座

根据阳历出生日期计算星座。





format(‘m’);
$day = $date->format(‘d’);

$constellation = null;
// 根据月份和日期判断星座
if ($month == 1) {
if ($day <= 19) {
$constellation = “摩羯
} else {
$constellation = “巨蟹座”;
}
} elseif ($month == 7) {
if ($day <= 22) {
$constellation = “巨蟹座”;
} else {
$constellation = “狮子座”;
}
} elseif ($month == 8) {
if ($day <= 22) {
$constellation = “狮子座”;
} else {
$constellation = “处女座”;
}
} elseif ($month == 9) {
if ($day <= 22) {
$constellation = “处女座”;
} else {
$constellation = “天秤座”;
}
} elseif ($month == 10) {
if ($day <= 22) {
$constellation = “天秤座”;
} else {
$constellation = “天蝎座”;
}
} elseif ($month == 11) {
if ($day <= 21) {
$constellation = “天蝎座”;
} else {
$constellation = “射手座”;
}
} else {
if ($day <= 21) {
$constellation = “射手座”;
} else {
$constellation = “摩羯座”;
}
}

// 输出星座
echo ”

您的星座是:$constellation

“;
}
?>

By botpp

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注