PHP and HTML mixed

Source: Internet
Author: User



Please enter:



My understanding is that I've cycled 5 times and I didn't do the echo output. How do I have 5 input boxes on my page?

Novice Help


Reply to discussion (solution)

Everything outside the tag will be output directly.

The content in for will be looped
The equivalent of executing the contents of the loop body multiple times and then outputting the HTML.
This has nothing to do with ECHO, because HTML is inherently output.

Still don't understand.


Please enter:

Your code is a complete loop, the second line is displayed directly by the browser does not need to echo, because this line of code is HTML is not part of PHP, the first row and the third line formed a loop structure, so it will be on the page cycle shows the first and third row between the content, Here is the loop display is not the loop output, HTML is to write what will show what, PHP code is required to output (print)

Your code is equal to

 
   '; endfor;}? >

Thank you for your answer. O (∩_∩) o Thank you

Everything in the HTML can be equivalent to the previous echo, so you can understand.

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