Simple php version _ php instance

Source: Internet
Author: User
This article mainly introduces the simple version of the 9-9 multiplication table implemented by php. The code is simple and easy to understand and can be used to answer interview questions, if you need a friend, you can refer to the 9th multiplication table, which is also a program question for many interview tests. The Logic Thinking Ability of php interviewers is mainly about understanding and using algorithms, below is the php code written in php to output the jiujiu multiplication formula:

<? Phpfor ($ I = 1; $ I <= 9; $ I ++) {for ($ j = 1; $ j <= $ I; $ j ++) {echo "$ I * $ j = ". $ I * $ j. '';} echo'
';}?>

After reading it, is it very easy? It is two loops, the outer controls the number of rows in the loop, and the inner controls the number of inputs in each row.

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.