PHP gets the name of the constellation that corresponds to the specified date
/** * Gets the specified date corresponding constellation * * @param integer $month month 1-12 * @param integer $day date 1-31 * @return boolean|st Ring */Public Function getconstellation ($month, $day) {$day = Intval ($day); $month = Intval ($month); if ($month < 1 | | $month > | | $day < 1 | | $day >) return false; $signs = Array (' + ' = ' Aquarius '), Array (' + ' = ' pisces '), array (' + ' = ' Aries '), Array (' + ' = ' Taurus '), Array (' + ' = ' Gemini '), Array (' + ' + ' cancer '), Array (' + ' = ' Leo '), Array (' + ' = ' virgo '), Array (' ' + ' = ' libra '), Array (' + ' = ' Scorpio '), Array (' + ' = ' sagittarius '), Array (' + ' + ' Capricorn ')); List ($start, $name) = each ($signs [$month-1]); if ($day < $start) List ($start, $name) = each ($signs [($month-2 < 0): $month-2]); REturn $name; }