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.


<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

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: