Hi
I'm trying to determine if a variable $due which outputs as a date in format June 10, 2006 is between 2 other dates and if it is to assign a variable $star.
I've tried the following:
if ( strtotime($due) >= strtotime("March 21, 2006") AND <= strtotime("April 20, 2006") )
{
$star = "My star sign should be Aries";
}
elseif ( strtotime($due) >= strtotime("April 21, 2006") AND <= strtotime("May 20, 2006") )
{
$star = "My star sign should be Taurus";
}
And also
if ($due >= "March 21, 2006" AND <= "April 20, 2006")
{
$star = "My star sign should be Aries";
}
elseif ($due >= "April 21, 2006" AND <= "May 20, 2006")
{
$star = "My star sign should be Taurus";
}
Both return an error about parse error, unexpected T_IS_SMALLER_OR_EQUAL
Any ideas...I'm guessing I may have to use different comparison operators or something but cant find anything.....any ideas?