Hello everyone, I am a beginner in php. I don't understand html and php code embedding. For example: {code ...} why is "}" placed separately in & amp; lt ;? Php? & Amp; gt; medium. Why can't I write it like this? {Code...} Thank you very much for answering your questions! Hello, I am a beginner in php. I don't understand how to embed html and php code,
For 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 is "}" stored separately in . Why can't I write it 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. } else { 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 for answering your questions!
Reply content:
Hello, I am a beginner in php. I don't understand how to embed html and php code,
For 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 is "}" stored separately in . Why can't I write it 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. } else { 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 for answering your questions!
Because
Tags belong to html rather than php, so they cannot be added to the starting and ending symbols of php.
It indicates the end symbol of the php code block "}"
Because
There were some problems with the form you submitted.Please complete the fields highlighted below and click Send Details to resend the form.
Invalid PHP code.
In In php code, the second writing method is very obvious.
The content in is not the php code.
If you want to use the second method, you can write as follows:
... '; } else { echo ' ...
'; } ?>
AllNon-html code
Must be embedded in
And all
It will be parsed into php Code. According to your ideas, that pair
The content in the label does not belong to the php code, so it should be embedded in segments as follows:
xxx
xxx
7048
It should be understood in this way.
In php,?> Starting to output html,
You can do this:
There were some problems with the ....
Thanks for choosing to join The Widget Club....
The syntax start label of PHP is PHP must be written in this way !!!