This is what I want:
If comparisonTimeH isn't zero, I want it to check if comparisonTimeH is zero, and comparisonTimeM is larger than or equal to 2. If so, I want it to pass and run the script.
This is what I have, and it's not right. It runs the else statement, echo test 2.
if ($comparisonTimeH != 0 || $comparisonTimeH = 0 AND $comparisonTimeM >= 1) {
echo "test";
}
else {
echo "test2";
}
echo "<br />" . $comparisonTimeH . " " . $comparisonTimeM;
My last echo, the one outside of the if statements - it returns 0 and 12. Thus, both conditions that I'm trying to get, are true.
My if's logic is clearly wrong, and I can't figure out what operators to use. If I change the AND to &&, it breaks and my final echo doesn't return comparisonTimeH (it's blank).
Please teach me, thanks!