COMPUTER LEARNING CENTER
WWW.HUUKHANG.COM
</HEAD>
<BODY>
<h4>Multi And Divide Operator</h4>
<?php
$i=10;
$j=5;
echo
$i/$j;
echo
"<br>";
echo
$i*$j;
?>
</BODY>
</HTML>
2.4.
Toaùn töû modulus: %
Khi chia moät soá cho moät soá, baïn caàn keát quaû laø soá dö cuûa pheùp chia ñoù thì
duøng toaùn töû modulus
Ví duï 3.4: Pheùp toaùn %
<HTML>
<HEAD>
<TITLE>::Welcome to PHP</TITLE>
</HEAD>
<BODY>
<h4>Mod Operator</h4>
<?php
$i=10;
$j=7;
echo
$i%$j;
echo
"<br>";
?>
</BODY>
</HTML>
2.5.
Toaùn töû quan heä: >=,>,<,<=,==,!=
Khi caàn so saùnh keát quaû giöõa hai toaùn haïn vôùi nhau, thoâng thöôøng baïn nghó
ñeán pheùp toaùn so saùnh nhö laø baèng, lôùn hôn, nhoû hôn, ví duï sau dieãn giaûi cho
baïn caùc toaùn töû treân:
Ví duï 3.5: Pheùp toaùn >,>=,<,<=,==,!=
<HTML>
<HEAD>
<TITLE>::Welcome to PHP</TITLE>
</HEAD>
<BODY>
<h4>Comparation Operators</h4>
<?php
3-4