PHP Programing language

adplus-dvertising
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.


<html>
<head>
<title>Math operator example</title>
</head>
<body>
<h1>
Using Math Operator</h1>
<?php
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>";
?>
</body>
</html>
output
Previous Home Next