hi everyone this is Raghu from tutorial dr.com and welcome to PHP video series so in this lecture we will see an example of our examples of logical operators so let’s open my sublime text are any text editor so here let’s create a new you know new file inside the operators so this is the entry file and you can copy the contents of the automatic dot PHP or maybe you can write from scratch so just open the PHP tag and then so as I mentioned earlier so the logical operators are nothing but ampersand ampersand and symbol or add text or or and the text are and the last one is not symbol so these are the logical operators let let me comment this so that you know it won’t affect my output so let’s take two variables dollar T and dollar F so I’m using TN here just to you know give an idea that T is nothing but true and that is false equals false okay now what I do if else loop but before writing if-else loop we haven’t it see how the if-else loop work in PHP so that basic if-else syntax is if followed by a condition and then followed by a block if this condition is true then this block will be executed if it is false it will just go to the if condition we can also include else condition and this else will be executed if the condition is false so well condition true this is conviction Falls so this is a simple if-else loop syntax so let’s start coding so if don t that is my variable and our use and dollar F if this condition is true then echo t & % & % half is true because this condition is successful and that’s why it went inside this loop and also we will echo a new line that is break okay let me go to condition and else means if the condition is false then we can write T and F is so this is very simple so this block will be executed only if the condition is true this block will be executed only if the condition is false so let me copy this and paste it several times so we need another four times one two three four okay I’ll just change few things so this one keep it as it is when the next one is instead of an and we’ll use a text hand and T and F is true hence T entities false and now let me use two pipes that is nothing but R so it is very straightforward and then this is the text our these fonts and the last ones not so I’ll use not in front off I’ll just let’s use it not off storewide confusion let’s have another parenthesis so echo lot of tea means true and the next one is fun so I know this is kind of confusing but if I once Rhonda you know this you know if I if I show this on the browser then it will be clear so let’s open my browser and reload okay here it is giving some output so true and enough false is false correct and this these two will should give the same a result these two should clear the same result and then not of true is false so here I want to you know tell you what is an and so and and is nothing but if it will be true only if both T and F are true means both variables are true otherwise it will be false in all the cases even the left side one is false even the right side one is false even the both are phones the result will be false so remember if you use ampersand ampersand so let me write otherwise so here so ampersand ampersand things only then both left and right true so in all other condition this will be false so ampersand ampersand odd and both are same and the next one is two pipes or this is also called as R is true these false only when both left side one and right side variable are false which means if we have at least one is true then we will get the output is true but it is false only if both are false okay and the knot symbol is nothing but the opposite of you can’t remove it’s like opposite or reverse so if the input is true then output will be false if the input is false the output will be too


Google Plus

Apache Zookeeper Tutorial

Apache Kafka Tutorial

Apache Kafka Security

Elasticserarch n Kibana

Java 8 Tutorial

Log4J Tutorial

Apache Storm Tutorial

SQLite Tutorial

Apache Ant Tutorial

Related Posts


Apache Kafka Commands Cheat sheet

Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
Read more…


What is Apache Maven | Apache Maven complete tutorial from scratch pdf

Spread the love In this post you will learn the complete tutorial of Apache Maven build tool What is Maven ? Apache Maven is a software project management and comprehension tool. Based on the concept
Read more…


Practical Guide for Web Development in 2018

Spread the loveWelcome to my practical guide  for web development in 2018 in terms of  technology and career. Before we start I just want to  mention a few things, you don’t need to learn  everything that
Read more…