If statements skip this statement and execute the next statement. how to write a lot of data into the database?
For example, if ($ a = 2 ){
Skip this entry
}
How should I write the code? the full code is directly provided by the eldest brother. thank you!
Reply to discussion (solution)
If ($! = 2 ){
Skip this entry
}
When $ a = 2, the data is not written to the database, and the next
If ($! = 2 ){
Execute this
}
Loop continue
If ($! = 2 ){
Mysql_query ('Insert ...');
}
If it is in the loop body, continue.
Foreach ($ xxx as $ x) {if ($ a = 2) {continue; // if this requirement is met, the following statements in this cycle no longer start the next cycle} mysql_query ("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ");}
Foreach ($ xxx as $ x) {if ($ a = 2) {continue; // if this requirement is met, the following statements in this cycle no longer start the next cycle} mysql_query ("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ");}
++
The code you want is as follows:
If ($ a = 2) {} else {// a bunch of code}
The code you want is as follows:
If ($ a = 2) {} else {// a bunch of code}
++
Leave blank