The cycle turns Dizzy & lt ;? Php & nbsp; $ SQL & quot; select * fromhrefwhereid $ idorderbylink & quot; & nbsp; $ querymysql_query ($ SQL); & nbsp; while ($ arraymysql_fetch_array ($ query )) {& nbsp ;? Cyclically dizzy
$ SQL = "select * from href where id = $ id order by link ";
$ Query = mysql_query ($ SQL );
While ($ array = mysql_fetch_array ($ query )){
?>
Src = "list. files/biao_33.gif" width = 11 align = absMiddle>
">
}?>
This is a big one, but I want to change it to this when ID is not 1 2.
$ SQL = "select * from href where id = $ id order by link ";
$ Query = mysql_query ($ SQL );
If ($ id! = 1 and $ id! = 2 ){
While ($ array = mysql_fetch_array ($ query )){
?>
Src = "list. files/biao_33.gif" width = 11 align = absMiddle>
">
}}
?>
Elseif ($ id = 1 ){
Src = "list. files/biao_33.gif" width = 11 align = absMiddle>
">
}
Elseif ($ id = 2 ){
Src = "list. files/biao_33.gif" width = 11 align = absMiddle>
">
}
How can I get dizzy in that loop? Actually, I don't know. Where should I put this? I 've tried several times and it's not big.
------ Solution --------------------
$ Array {"link "};? Where did you see this? Incorrect. It should be $ array ["link"], enclosed in square brackets
We recommend that you use a professional editor, such as notepad ++ and eclipse, to highlight PHP syntax. In addition, the switch statement is more suitable for your situation.
PHP code
">
">
">