What are the ways to write php if?
This article introduces the relevant knowledge of "how to write php if". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
There are five ways to write php if, which are: 1, "if {...} else {...}"; 2, "if ():... else:...endif;"; 3, "... true: false;"; 4, "if ()..."; 5, "... &...".
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
What are the ways to write php if?
Five Writing methods of if statement in PHP
The code is as follows: