hi everyone this is Raghu from tutorial dr.com and welcome to my PHP video series so in this lecture we will see an example of arithmetic operators so let’s go to our concepts and create a new folder so I will name it as operators insert operators let me create a new file and save it as arithmetic and give an extension dot PHP so we have new PHP file so let’s start a PHP tag that is less than symbol question mark PHP followed by a closing tag so let’s take few variables like X and give it some value maybe 100 and then take another value that is something like 5 so as I mentioned earlier so arithmetic operators are nothing but plus minus and multiplication division and the last one is modulus that is percentage symbol so what we will do we will just you know take away another variable that is Z and we will perform all these arithmetic operations for instance z equals x plus y so we are adding these two variables ok and we should see the result so let’s echo this one addition so let’s display all the values x and y is okay so I save the file if you go to the browser and reload our page okay so we should go to the page called concepts and then operators here automatic so addition of 10 and 5 is 1 0 5 so it is working fine similarly we will do all the operations now let’s do subtraction subtraction of x and y is Z and let’s use multiplication of x and y and here use division of x and y and here use modulus reminder or you can use modulus of x and y is okay now let’s save the file and open the browser and remove it okay we got everything in one line so what we have to do we can use another echo statement with as I mentioned in the previous lecture you can use the break statement this is the HTML tag so break is nothing but give me a new line so let’s now add the break the end of each and every echo statement okay let’s save and a dual or double page so if you see I’d see enough 105 is two one zero five subtraction of 105 is 95 multiplication of 105 means 500 division of 105 is 20 modulus reminder of 105 is 0 because there is no remainder

Tags:






Youtube
Facebook
Google Plus
Twitter
TutorialDrive


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

blog

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…

blog

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…

blog

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…