91
Adding Two Numbers
There are three methods to add two numbers:
- Adding in simple code in PHP
- Adding in form in PHP
- Adding without using arithmetic operator (+).
Adding in Simple Code
Addition of two numbers 15 and 30 is shown here.
Example:
Output:
Adding in Form
Two numbers can be added by passing input value in the form.
Example:
Output:
Adding in Simple Code
Two numbers can be added by passing input value in the form but without using (+) operator.
Output:
Next TopicSubtracting Two Numbers