本文实例讲述了php根据日期显示所在星座的方法。分享给大家供大家参考。具体实现方法如下: <?php function zodiac($DOB){ $DOB = date("m-d", strtotime($DOB)); list($month,$day) = explode("-",$DOB); if(($month == 3 || $month == 4) && ($day > 22 || $day < 21 xss=removed xss=removed xss=removed> 22 ||