Saturday, 24 October 2015

Php tutorial 1-Arithmetic operations

PHP Tutorials-1-Arithmetic Operations...

For Addition :

<?php
$num1=20;
$num2=2;

echo $num1+$num2;
?>

Output : 22

For subtraction :

<?php
$num1=20;
$num2=2;

echo $num1-$num2;
?>

Output:18

For Multiplication :

<?php

$num1=20;
$num2=2;

echo $num1*$num2;
?>

Output : 40

For Division :

<?php
$num1=20;
$num2=2;

echo $num1/$num2;
?>

Output : 10

Search by Keywords :

Php tutorial for Arithmetic operations
Arithmetic operations in php
php tutorial for arithmetic operations

No comments:

Post a Comment