below provides a function that uses PHP to determine which constellation a date belongs to, and the friends you need can refer to the following
Code as follows: function yige_constellation ($month, $day) { //Check parameter validity &NBSP;IF ($month < 1 | | $month > 12 || $day < 1 | | $day >) return false; //constellation name and start date $constellations = array ( array ("=>" "Aquarius"), Array ("=>" "Pisces") , Array ("=>" "Aries"), Array ("=>" "Taurus"), Array ("=>" Gemini), Array ("22" =& Gt "Cancer"), Array ("=>" "Leo"), Array ("=>" "Virgo"), Array ("=>" "Libra"), Array (" "=>" "Scorpio"), Array ("=>" "Sagittarius"), Array ("" => "Capricorn") ); list ($constellation _start, $constellation _name) = each ($constellations [(int) $month-1]); if ($day < $constellation _start) List ($constellation _start, $constellation _name) = each ($ constellations[($month-2 < 0)? $month = one: $month-= 2]); return $constellation _name; } Call example: code as follows: Echo Yige_constellation (4, 20);