Php operations. $ A2; $ a1? $ Test Enterprise :( $ a2? $ Test region: $ test other places); echo $ test; first, judge whether $ a is 1. if it is a direct output enterprise, if it is not, continue to judge whether it is equivalent to el $ a = 2;
$ A = 1? $ Test = "enterprise": ($ a = 2? $ Test = "region": $ test = "other places ");
Echo $ test;
First, judge whether $ a is 1. if it is a direct output enterprise, if it is not, continue to judge whether it is equivalent to another nested if in else. if it is equal to 2, the output region is not output elsewhere.
Equivalent
$ A = 2;
If ($ a = 1 ){
Echo $ test = "enterprise ";
} Else {
If ($ a = 2 ){
$ Test = "region ";
} Else {
$ Test = "other places ";
}
}
Echo $ test;
Or
If ($ a = 1 ){
Echo $ test = "enterprise ";
} Else {
$ A = 2? $ Test = "region": $ test = "other places ";
}
Cost = 2; $ a = 1? $ Test = enterprise: ($ a = 2? $ Test = region: $ test = other places); echo $ test; first, judge whether $ a is 1. if it is a direct output enterprise, if it is not, continue to judge whether it is equivalent to el...