$from =’date one’;
$to = ‘date two’;

$return = true;
        $date = date( 'Y-m-d');
        $today = strtotime ($date);
        if ($from && $today < $from) {
            $return = false;
        }
        if ($to && $today > $to) {
            $return = false;
        }
        if (! $to && ! $from) {
            $return = false;
        }

        Echo $return;
Your Answer
Login
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.