“Find odd even number ” is the basic PHP program for a PHP learner. As you all aware, Odd numbers are not divisible by 2 and Even numbers are divisible by 2. Example : Odd number: 3, 5, 7, 9,11 Even number: 2, 4, 6, 8, 10 So here I am gonna explain it with a simple PHP program. Odd Even Number Program :- <?php $number=22; if($number%2==0) { echo “22 is an even number”; } else { echo “22 is not odd number”; } ?> Output…
Month: August 2018
Swap Two Number Program In PHP
Swap two number generally is the process of interchange two variables with each other. Just suppose you have X whose value 10 there is another number Y with value of 20. Now if we swap these two number with each other then the X value will change to 20 and Y value will change to 10. So here I am gonna explain with a simple PHP program. Swap Two Number Program :- <?php $x=10; $y=20; echo “Value of x: $x</br>”; echo “Value of y: $y</br>”; $temp=$x; $x=$y; $y=$temp; echo “Value of x:…
Armstrong Number Program in PHP
“Armstrong Number Program” is the initial program from where most of the beginner developers will start to learn and write code in any language. An Armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits is equal to the number itself. Here is an example of check a armstrong number in PHP. Armstrong Number Program :- Below is the simple PHP program to check a number armstrong. <?php $number=153; $sum=0; $temp=$number; while($temp!=0) { $reminder=$temp%10; $sum=$sum+$reminder*$reminder*$reminder; $temp=$temp/10; } if($number==$sum) { echo “It…
Process to Install Docker on Ubuntu 16.04
Docker :- Docker is a container management service. The keywords of Docker are develop, ship and run anywhere. The whole idea of Docker is for developers to easily develop applications, ship them into containers which can then be deployed at anyplace. Docker has two flavors : Community Edition (CE) Enterprise Edition (EE) So if you don’t know which one should be install, just pick up The Community Edition (CE) flavor and install as below Docker Installation :- Follow the step by step process – Step#1 :- Set up the docker repository $ sudo…
What is Docker and Why We Use ?
What is docker ? Docker is a container management service. The keywords of Docker are develop, ship and run anywhere. The whole idea of Docker is for developers to easily develop applications, ship them into containers which can then be deployed at anyplace. Docker has two flavors : The Community Edition (CE) and the Enterprise Edition (EE) Initial Release : March 2013 Mostly use on agile based project. Reference Why docker ? Docker has the ability to reduce the size of development by providing a smaller footprint of the operating system via containers.…
