Incorrect php loop output table

Source: Internet
Author: User
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
  • Liu Yanchi


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

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.