I am working on a small script. (My first)
Here is where I run into a problem..
} elseif ($hours >= 24) {
echo "Only $days more day";
} elseif ($hours >= 48) {
echo "Only $days more days";
As you can see.. if $hours >= 24 it echos "Only $days more day" so it can't make it to the next line because in order for >= 48 to be true, then >= 24 has to be true, and in such case it catches on 24 and never makes it to 48.
What I need is something like..
} elseif ($hours >= 24) AND ($hours < 48) {
echo "Only $days more day";
} elseif ($hours >= 48) {
echo "Only $days more days";
So that in order for the first part to be True the hours must be 24 or above, but must also be under 48. If it's 48 or over, it will echo the second part instead.
But, if I use "AND" or "&&" I get an error...
"Parse error: parse error, unexpected T_BOOLEAN_AND in /home/breach/public_html/test.php on line 26"
Any ideas? Any ways around this?