PHP implementation of 99 multiplication tables Concise version _php tutorial

Source: Internet
Author: User
Tags php write

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.