Zodiac Sign based on the date
-
Hello.
I Have a metakey called simply “sign” where should be visible the astrologic sign.
I have this code, but i am not able to find out how to hook it with the metakey. I tryed alone everything, but it’s over of my capabilitys obviously:
<?php function segno_zodiacale($data){ list($giorno,$mese,$anno) = explode('-',$data); if(($mese==1 && $giorno>20)||($mese==2 && $giorno<20)){ return 'Acquario'; }else if( ($mese==2 && $giorno>18 )||($mese==3 && $giorno<21)){ return 'Pesci'; }else if( ($mese==3 && $giorno>20)||($mese==4 && $giorno<21)){ return 'Ariete'; }else if( ($mese==4 && $giorno>20)||($mese==5 && $giorno<22)){ return 'Toro'; }else if( ($mese==5 && $giorno>21)||($mese==6 && $giorno<22)){ return 'Gemelli'; }else if( ($mese==6 && $giorno>21)||($mese==7 && $giorno<24)){ return 'Cancro'; }else if( ($mese==7 && $giorno>23)||($mese==8 && $giorno<24)){ return 'Leone'; }else if( ($mese==8 && $giorno>23)||($mese==9 && $giorno<24)){ return 'Vergine'; }else if( ($mese==9 && $giorno>23)||($mese==10 && $giorno<24)){ return 'Bilancia'; }else if( ($mese==10 && $giorno>23)||($mese==11 && $giorno<23)){ return 'Scorpione'; }else if( ($mese==11 && $giorno>22)||($mese==12 && $giorno<23)){ return 'Sagittariuo'; }else if( ($mese==12 && $giorno>22)||($mese==1 && $giorno<21)){ return 'Capricorno'; } } ?>
Sorry, the code is in italian. ($mese is month and $giorno is day).
Thanks
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Zodiac Sign based on the date’ is closed to new replies.