Here is a simple PHP program example to find the sum of 2 numbers
Output: The sum of two numbers is: 5
UNIT-304
Elementary Server Side Scripting through PHP
<?php
$no1=3;
$no2=2;
$result=$no1+$no2;
echo "The sum of two numbers is: $result";
?>
Output: The sum of two numbers is: 5
UNIT-304
Elementary Server Side Scripting through PHP
- PHP Introduction
- How to save PHP page
- PHP variables and their naming conventions
- PHP program to find maximum of 5 numbers
- PHP program to find minimum of 5 numbers
- PHP program to find sum of 2 numbers
- PHP program to find subtraction of 2 numbers