php迴圈輸出表格錯位的問題

來源:互聯網
上載者:User
  

外聘專家

  • 姓 名
  • 職稱
  • 價格
  • 姓 名
  • 職稱
  • 價格
  • 姓 名
  • 職稱
  • 價格
  • 劉 紅
  • 祝 蓉
  • 吳金榮
  • 劉燕池

我想輸出這個表格,可是到了第二行的時候就只顯示一個然後換行,我用table的時候沒問題。
";  }    if ( $arrayServiceType[$i]['type'] == '1' ) {  if(($i+1) % 4 == 0) {  $strWaiDoctor.="
  • ".$arrayServiceType[$i]['doctorname']."
  • ".$arrayServiceType[$i]['金額']."元
  • "; }else{ $strWaiDoctor.="
  • ".$arrayServiceType[$i]['doctorname']."
  • ".$arrayServiceType[$i]['金額']."元
  • "; } } if(($i+1) % 4 == 0) { //if(($i+1) % 3 == 0) { $strWaiDoctor.= ""; } } echo $strWaiDoctor; }?>


    回複討論(解決方案)

    ";                      }                                            if ( $arrayServiceType[$i]['type'] == '1' ) {                          if(($i+1) % 4 == 0) {                              $strWaiDoctor.="
  • ".$arrayServiceType[$i]['doctorname']."
  • ".$arrayServiceType[$i]['金額']."元
  • "; }else{ $strWaiDoctor.="
  • ".$arrayServiceType[$i]['doctorname']."
  • ".$arrayServiceType[$i]['金額']."元
  • "; } } if(($i+1) % 4 == 0) { // if(($i+1) % 3 == 0) { $strWaiDoctor.= ""; } } echo $strWaiDoctor; } ?>


    試試

    樓上的兄弟還是不行啊

      

    外聘專家

    • 姓 名
    • 職稱
    • 價格
    • 姓 名
    • 職稱
    • 價格
    • 姓 名
    • 職稱
    • 價格
    • 劉 紅
    • 祝 蓉
    • 吳金榮
    • 劉燕池
    • 劉燕池1
    • 劉燕池1

    沒有人知道嗎?
    拜託啊

    不用貼你的PHP代碼,看看HTML代碼是否完整,如果完整的話,那肯定就是CSS寫的不對了,可以去頁面設計的版面論壇去問問……

    在HTML代碼裡面顯示的是沒問題的

    就沒人知道怎麼回事嗎

    應該是你的程式判斷的原因

    utf-8的問題,你把檔案都改成ANSI就可以了,參考http://blog.csdn.net/aniven/article/details/6925561

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.