sonny
11-19-2011, 03:05 AM
Hi
This works because I'm working with a single number, problem is I need to do
this with a month and day like between 11-19 and 12-15 etc, should I use a
timestamp or z for day of year? whats the most efficient way to do something
like this?.
if (date("m") >= 9 && date("m") <= 11) {
echo "This is within range";
echo date("m");
}
else {
echo "Not within range";
echo date("m");
}
// I need to do something like
if (date("m-d") >= "11-19" && date("m-d") <= "12-15") {
echo "This is within range";
echo date("m-d");
}
Thanks
Sonny
This works because I'm working with a single number, problem is I need to do
this with a month and day like between 11-19 and 12-15 etc, should I use a
timestamp or z for day of year? whats the most efficient way to do something
like this?.
if (date("m") >= 9 && date("m") <= 11) {
echo "This is within range";
echo date("m");
}
else {
echo "Not within range";
echo date("m");
}
// I need to do something like
if (date("m-d") >= "11-19" && date("m-d") <= "12-15") {
echo "This is within range";
echo date("m-d");
}
Thanks
Sonny