In php, what are the common errors in the if (a = B) {c = 10; d = 100} statements ?, For php condition statements, either & nbsp ;=/// & nbsp; if & nbsp; ($ a & nbsp ;=& nbsp ;$ B) or & nbsp; ===& nbsp; & nbsp; if & nbsp; ($ a & nbsp ;==& nbsp; $ B) simple php problems
In the statement if (a = B) {c = 10; d = 100}, what are the errors?
------ Solution --------------------
Php condition statement
Either = // if ($ a = $ B)
Either === if ($ a ===$ B)
D = 100 followed by no semicolon
Add $
------ Solution --------------------
The logical judgment should use the equal sign =. in js, you do not need to add extra points at last. php must add $ and.
------ Solution --------------------
Four ~
// 1 $ a $ B $ c $ d
// 2 $ a = $ B
// 3 $ d = 100;
// 4. code format problems.
------ Solution --------------------
Reference:
Four ~
// 1 $ a $ B $ c $ d
// 2 $ a = $ B
// 3 $ d = 100;
// 4. code format problems.
There is no error in the second syntax.
Are there any errors, depending on the requirements?
------ Solution --------------------
1. neither a nor B is defined.
2 variable to use $
3. PHP compares two equal signs.
4 $ d = 100 missing a semicolon
------ Solution --------------------
1. Add $.
2. $ d = plus points after 100.
Otherwise, no error is reported.
------ Solution --------------------
I haven't seen each other for a long time. I answered this question according to the 2b logic of this person ~ Of course, there is no error in pure syntax in single value assignment.
Reference:
Reference: Four ~
// 1 $ a $ B $ c $ d
// 2 $ a = $ B
// 3 $ d = 100;
// 4. code format problems.
There is no error in the second syntax.
Are there any errors, depending on the requirements?
------ Solution --------------------
1. $ a, $ B, $ c, $ d,
Plus points after 2.100;
3. $ a = $ B, which is correct ~