function zodiacal_sign($d,$m,$lng) { // день, месяц, язык

#by ENTER#
 $d=sprintf('%02d',$d);
 $m=sprintf('%02d',$m);

if (($m=='03' && $d>20) || ($m=='04' && $d<21)) return ($lng == "eng") ? "Oven" : "Овен"; //21.03-20.04
if (($m=='04' && $d>20) || ($m=='05' && $d<22)) return ($lng == "eng") ? "Taurus" : "Телец"; //21.04-21.05
if (($m=='05' && $d>21) || ($m=='06' && $d<22)) return ($lng == "eng") ? "Gemini" : "Близнецы"; //22.05-21.06
if (($m=='06' && $d>21) || ($m=='07' && $d<23)) return ($lng == "eng") ? "Cancer" : "Рак"; //22.06-22.07
if (($m=='07' && $d>22) || ($m=='08' && $d<24)) return ($lng == "eng") ? "Leo" : "Лев"; //23.07-23.08
if (($m=='08' && $d>23) || ($m=='09' && $d<24)) return ($lng == "eng") ? "Virgo" : "Дева"; //24.08-23.09
if (($m=='09' && $d>23) || ($m=='10' && $d<24)) return ($lng == "eng") ? "Libra" : "Весы"; //24.09-23.10
if (($m=='10' && $d>23) || ($m=='11' && $d<23)) return ($lng == "eng") ? "ScOpion" : "Скорпион"; //24.10-22.11
if (($m=='11' && $d>22) || ($m=='12' && $d<22)) return ($lng == "eng") ? "Sagittarius" : "Стрелец"; //23.11-21.12
if (($m=='12' && $d>21) || ($m=='01' && $d<19)) return ($lng == "eng") ? "Capricorn" : "Козерог"; //22.12-20.01
if (($m=='01' && $d>20) || ($m=='02' && $d<19)) return ($lng == "eng") ? "Aquarius" : "Водолей"; //21.01-18.02
if (($m=='02' && $d>18) || ($m=='03' && $d<21)) return ($lng == "eng") ? "Fish" : "Рыбы"; //19.02-20.03

 return null;
}

echo zodiacal_sign(23,11,'rus'); //пример: Стрелец 

You must be logged in to leave a reply.