PHP implementation of the 99 multiplication table concise version

Source: Internet
Author: User
Tags php code

This article mainly introduces the PHP implementation of the 99 multiplication table concise version, code simple and easy to understand, you can use to answer the questions oh, need friends can refer to the

99 multiplication table is also a lot of interview test procedures, to examine the PHP interviewer's logical thinking ability, is mainly the understanding of the algorithm and application, the following is a small series of PHP written in the output of 99 multiplication formula PHP code:

For ($i =1 $i <=9; $i + +)

{

for ($j =1; $j <= $i; $j + +)

{

echo "$i * $j =". $i * $j.

}

Echo '

';

}

?>

After seeing, is not very simple, is two loops, the outer control loop line number, the inner layer controls each line to enter the number of formulas.

Screenshot of output result:

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.