PHP Programing language

Math Operator Example
Previous Home Next

The PHP operators that you use to manipulate your data; $variable +8 adds 8 to the value in $variable. The expression $variable * 4 multilines the value on $variable by 4.Even if you've seen operators in other languages.

<title>Math operator example</title>
Using Math Operator</h1>
echo "7+2=",7+2 ,"<br>";
echo "7-2=",7-2 ,"<br>";
echo "7*2=",7*2 ,"<br>" ;
echo "7/2=",7/2 ,"<br>";
echo "7%2=",7%2 ,"<br>";
Previous Home Next