Home >Backend Development >PHP Tutorial >Mathematical multiplication table php small multiplication table implementation code

Mathematical multiplication table php small multiplication table implementation code

WBOY
WBOYOriginal
2016-07-29 08:40:201175browse

Copy code The code is as follows:


for($i=1;$i<10;$i++)
{
for($j=1;$j<=$i; $j++)
{
$result = $i*$j;
if(strlen($result)==2)
{
echo "$j*$i=$result";
echo " ";
}
else
{
echo "$j*$i=$result";
echo " ";
}
}
echo "
";
}
?>


Write a small program as you like , promote my passion for php, hope I can stick to it

The above introduces the implementation code of the mathematical multiplication table PHP small multiplication table, including the content of the mathematical multiplication table. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn