If you want to nest php code in html, it is usually okay. But how do I write a Condition Statement in a condition statement? For example: {code...}. After determining whether a cookie exists, you also need to determine whether $ list exists. However, an error occurred while writing. I don't know what... I want to nest php code in html. Generally, it's okay. But how do I write a Condition Statement in a condition statement?
For example:
Download list
....
After determining whether a cookie exists, you also need to determine whether $ list exists. However, an error occurred while writing.
I don't know how to solve this problem?
Reply content:
If you want to nest php code in html, it is usually okay. But how do I write a Condition Statement in a condition statement?
For example:
Download list
....
After determining whether a cookie exists, you also need to determine whether $ list exists. However, an error occurred while writing.
I don't know how to solve this problem?
Please refer to the following link for more information: https://www.php1.cn/article/7279.html.
If you do not understand, write the entire php statement, and then use echo to input the html Tag. The tag folder is too dizzy.
Or use a template.
The landlord can look at alternative PHP syntax specification: http://php.net/manual/zh/control-structures.alternative-syntax.php
No error is reported when I run it.
If the alternative syntax doesn't work, replace it with the basic syntax ~
Download list
....
// But it will not be dizzy ....
I personally think that the cookie should be placed inLogic layerAnd should not be droppedDisplay Layer. In this way, the code structure will be very bad and will not be well maintained in the future.