Incorrect php loop output table
External Expert
- Last name
- Title
- Price
- Last name
- Title
- Price
- Last name
- Title
- Price
- Liu Hong
- Zhu Rong
- Wu Jinrong
I want to output this table, but when the second row is reached, only one line is displayed and the line feed is displayed. it is okay when I use the table.
";} If ($ arrayServiceType [$ I] ['type'] = '1') {if ($ I + 1) % 4 = 0) {$ strWaiDoctor. ="". $ ArrayServiceType [$ I] ['doctorname']."". $ ArrayServiceType [$ I] ['amount ']." RMB";} Else {$ strWaiDoctor. ="
". $ ArrayServiceType [$ I] ['doctorname']."". $ ArrayServiceType [$ I] ['amount ']." RMB";}} If ($ I + 1) % 4 = 0) {// if ($ I + 1) % 3 = 0) {$ strWaiDoctor. ="";}} Echo $ strWaiDoctor;}?>
Reply to discussion (solution)
";} If ($ arrayServiceType [$ I] ['type'] = '1') {if ($ I + 1) % 4 = 0) {$ strWaiDoctor. ="". $ ArrayServiceType [$ I] ['doctorname']." ". $ ArrayServiceType [$ I] ['amount ']." RMB";} Else {$ strWaiDoctor. ="
". $ ArrayServiceType [$ I] ['doctorname']." ". $ ArrayServiceType [$ I] ['amount ']." RMB";}} If ($ I + 1) % 4 = 0) {// if ($ I + 1) % 3 = 0) {$ strWaiDoctor. ="";}} Echo $ strWaiDoctor;}?>
Try
The upstairs brother is still not good.
External Expert
- Last name
- Title
- Price
- Last name
- Title
- Price
- Last name
- Title
- Price
- Liu Hong
- Zhu Rong
- Wu Jinrong
- Liu Yanchi
- Liu Yanchi 1
- Liu Yanchi 1
No one knows?
Please.
You don't need to post your PHP code to see if the HTML code is complete. if it is complete, it must be wrong with CSS. you can go to the page design forum to ask ......
It is okay to display in the HTML code.
No one knows what's going on?
It should be the reason for your program's judgment
UTF-8 problem, you can change all files to ANSI, refer to the http://blog.csdn.net/aniven/article/details/6925561