Home >Backend Development >PHP Tutorial >PHP implements ninety-nine multiplication tables

PHP implements ninety-nine multiplication tables

PHP中文网
PHP中文网Original
2016-07-25 09:08:0435898browse

php implements the ninety-nine multiplication table


PHP implements ninety-nine multiplication tables


2. [Code][PHP] code

<?php 
for($i=1;$i<=9;$i++)
{for($j=1;$j<=9;$j++)
{if($j<=$i){
echo $j."*".$i." = ".$i*$j." ";}
}
echo "<br/>";
}
 ?>

The above is the content of the PHP implementation of the ninety-nine multiplication table. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


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