PHP Math functions for addition, subtraction, multipication & division
Simple PHP functions to handle addition , subtraction , multiplications and divisions can be done by using built in functions.
Best way to learn is to develop some sample scripts.
Here are some of them.
Let us start with simple addition of two variables storing numbers.
Now try a subtraction.
The output of division can be formatted to required decimal places
Number of User Comments : 2
|What is the value is not given, or not been initialize? Then what if i want to display my answer in textbox? Any idea?|
|Textbox value can be connected to display variable $c|
echo "<input type=text name=t1 value=$c>";