Here is a function to get zodiac sign
Code:
function getstarsign($date){
list($year,$month,$day)=explode("-",$date);
if(($month==1 && $day>20)||($month==2 && $day<20)){
return "Aquarius";
}else if(($month==02 && $day>18 )||($month==03 && $day<21)){
return "Pisces";
}else if(($month==03 && $day>20)||($month==04 && $day<21)){
return "Aries";
}else if(($month==04 && $day>20)||($month==05 && $day<22)){
return "Taurus";
}else if(($month==05 && $day>21)||($month==06 && $day<22)){
return "Gemini";
}else if(($month==6 && $day>21)||($month==07 && $day<24)){
return "Cancer";
}else if(($month==07 && $day>23)||($month==08 && $day<24)){
return "Leo";
}else if(($month==08 && $day>23)||($month==09 && $day<24)){
return "Virgo";
}else if(($month==09 && $day>23)||($month==10 && $day<24)){
return "Libra";
}else if(($month==10 && $day>23)||($month==11 && $day<23)){
return "Scorpio";
}else if(($month==11 && $day>22)||($month==12 && $day<23)){
return "Sagittarius";
}else if(($month==12 && $day>22)||($month==01 && $day<21)){
return "Capricorn";
}
}

Comment