Web Backend-The Terminator "when embedding HTML code in PHP"? > "Why is this place?"

Source: Internet
Author: User
Everybody good, I beginner php, about HTML and PHP code embedding a little does not understand,

As an example:


  
   

There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.

Thanks for choosing to join The Widget Club. To register, please fillin your details below and click Send Details. Fields marked with an asterisk(*) are required.

Why do you Encounter "}" here and put it in a separate place . Why can't it be written like this?


  
   There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.

Thanks for choosing to join The Widget Club. To register, please fillin your details below and click Send Details. Fields marked with an asterisk(*) are required.

Thank you very much, troubleshoot!

Reply content:

Everybody good, I beginner php, about HTML and PHP code embedding a little does not understand,

As an example:


  
   

There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.

Thanks for choosing to join The Widget Club. To register, please fillin your details below and click Send Details. Fields marked with an asterisk(*) are required.

Why do you Encounter "}" here and put it in a separate place . Why can't it be written like this?


  
   There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.

Thanks for choosing to join The Widget Club. To register, please fillin your details below and click Send Details. Fields marked with an asterisk(*) are required.

Thank you very much, troubleshoot!

Because

The tag is HTML instead of PHP, so it can't be added to the PHP start and end symbol


Indicates that he is the code block for PHP end symbol "}"

Because

There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.

is not a valid PHP code.

    1. In the PHP code, the second way, it is obvious that the label

      The content in is not PHP code.

    2. If you want to use the second notation, you can write this:


  
   

'; } else { echo '

...

'; } ?>

All of 非html代码 them are embedded inside , and all the inside will be parsed into PHP code, according to your idea, the pair

The contents of the tag are not part of the PHP code, so it should be embedded in such a fragment:


  
   xxx
  
   xxx
  
   

7048
Actually, it should be understood.
In PHP,?> indicates that HTML is starting to output,

Can do this:


  
       

There were some problems with the ....

Thanks for choosing to join The Widget Club....

Language PHP grammar start tag is the language of PHP decision must be written!!!

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