<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>php 様々な演算子</title>
<link rel="stylesheet" href="../style.css">
</head>
<body>
<?php
$ope1 = 10;
$ope2 = 2;
$num1 = $ope1 + $ope2;
$num2 = $ope1 - $ope2;
$num3 = $ope1 * $ope2;
$num4 = $ope1 / $ope2;
$num5 = $ope1 % $ope2;
?>
<table border="2">
<tr>
<th>項目</th>
<th>結果</th>
</tr>
<?php
echo "
<tr>
<td>\$ope1</td><td>{$ope1}</td>
</tr>
<tr>
<td>\$ope2</td><td>{$ope2}</td>
</tr>
<tr>
<td>$ope1 + $ope2 </td><td>{$num1}</td>
</tr>
<tr>
<td>$ope1 - $ope2 </td><td>{$num2}</td>
</tr>
<tr>
<td>$ope1 * $ope2 </td><td>{$num3}</td>
</tr>
<tr>
<td>$ope1 / $ope2 </td><td>{$num4}</td>
</tr>
<tr>
<td>$ope1 % $ope2 </td><td>{$num5}</td>
</tr>
"
?>
</table>
</body>
</html>