From the course: PHP Essential Training
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Logical operators - PHP Tutorial
From the course: PHP Essential Training
Logical operators
- [Instructor] Lastly we learned about basic logical expressions using if, else and else if. Now I want us to talk about the expression part of that the part that evaluates the true or false. And I want us to enhance our ability to work with that to generate some more complex expressions and to do that we're going to have to learn about comparison and logical operators. In the previous example, we said if A is greater than B or if A is less than B. Less than and greater than are comparison operators, but there are a number of other ones that we can use as well. One of the most important ones is equal. Our two things equal compare them is A equal to B? It's made up of two equal signs. When we're testing of something as equal, we do it by using two equal signs. So when we have one equal sign, we're doing assignment. We're assign a value to something, When we have two of them, we're comparing the two. It's important to keep…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.