Jump to content

Using the And operator


bhazzard

Recommended Posts

Alright I am learning to code php, and I just got to using the AND operator in If statements... this worked until I added the AND operator. What am I doing wrong?

<?php	if (date(G) >= 4) AND (date(G) <= 12) {   echo "Good Morking";	};		if (date(G) > 12) AND (date(G) <= 15) {   echo "Good Afternoon";	};		if (date(G) > 15) AND (date(G) <= 18) {   echo "Good Evening";	};		if (date(G) > 18) AND (date(G) <= 24) {   echo "Good Night";	};		if (date(G) >= 1) AND (date(G) < 4) {   echo "Up Late?";	};?>

Thanks a lot.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...