PHP implementation of the 99 multiplication table concise version
This article mainly introduces the PHP implementation of the 99 multiplication table concise version, code simple and easy to understand, can be used to answer questions oh, the need for friends can refer to the next
99 multiplication table is also a lot of interview test of the program, to examine the logical thinking ability of the PHP interviewer, mainly is the understanding and application of the algorithm, the following is a small series of PHP write output 99 multiplication formula PHP code:
for ($i =1; $i <=9; $i + +)
{
for ($j =1; $j <= $i; $j + +)
{
echo "$i * $j =". $i * $j. ';
}
Echo '
';
}
?>
After watching, is not very simple, that is, two loops, the outer control loop number of rows, the inner layer controls the number of formulas entered in each row.
Output Result:
http://www.bkjia.com/PHPjc/852820.html www.bkjia.com true http://www.bkjia.com/PHPjc/852820.html techarticle PHP Implementation of the 99 multiplication table concise version of this article mainly introduces the PHP implementation of the 99 multiplication table concise version, the code is simple and easy to understand, can be used to answer questions Oh, need friends can ...