Can PHP code be written like this ?? Today I learned a piece of weird code & lt ;? Php & nbsp; if & nbsp; (5 & lt; 4) & nbsp ;{? & Gt; & lt; div & gt; my name is Interface 1 & lt;/div & gt; & lt ;? Php & nbsp ;}& nbsp; else & nbsp ;{& nbsp ;? & Gt; can PHP code be written like this ?? Today I learned a piece of weird code.
I am the first interface
I am a user on interface 2
PHP syntax is not
Is that true?
What does this mean? There is an extra {number.
------ Solution --------------------
The landlord asked, "there is an extra {number in it"
Who have answered?
Don't think it's a small section, experience is accumulated
If you do not see the problem clearly, you can propose a solution that will never succeed!
------ Solution --------------------
When multiple lines of code are executed when the condition is true or fails, these lines of code must be included in curly brackets. At present, this mixed compilation method is missing.
------ Solution --------------------
Reference:
The landlord asked, "there is an extra {number in it"
Who have answered?
Don't think it's a small section, experience is accumulated
If you do not see the problem clearly, you can propose a solution that will never succeed!
This is not too many. isn't it added by the multi-line code behind the if statement,
This should be the original intention of PHP. process-oriented and efficiency-oriented,
There are still many frameworks like this, such as CI