Hi folks,
I'm translating VB (ASP) code to PHP (now in Linux) and have no idea how to port this:
if (d2 = 1 or d2 < 21) then
signo= "capricornio"
'elseif (d2 = 357 or d2 < 366) then
'signo= "capricornio"
elseif (d2 = 21 or d2 < 51) then
signo= "aquar"
elseif (d2 = 51 or d2 < 81) then
signo= "peixes"
elseif (d2 = 81 or d2 < 112) then
signo = "aries"
...
end if
I wrote in PHP this
if($daysAno==1 and $daysAno < 21 ) {
//$daysAno = $numero;
$signo= "capricórnio";
} else if ($daysAno=357 and $daysAno < 367 ) {
$signo= "capricórnio";
} else if ($daysAno=21 and $daysAno < 51 ) {
$signo= "aquário";
} else if ($daysAno=51 and $daysAno < 81 ) {
$signo= "peixes";
} else if ($daysAno=81 and $daysAno < 112 ) {
$signo= "áries";
...
}
But I walways get the wrog value for $signo and the value for $daysAno CHANGED!!!
How to write an instance like IF the value for my variable is between x and y???
TIA