使用PHP打印出垂直而不是水平的表格

时间:2017-03-26 10:05:01

标签: php html

问题:

我有一张水平打印的表格,但我希望它能打印出垂直方向。谁可以就如何实现这一目标提供指导?

PHP代码

animate('left':'-pixels');

Curent输出 Curent output 期望的输出: Desired output

1 个答案:

答案 0 :(得分:1)

请尝试以下代码:

<?php
  echo "<th>EKDA</th>";
  echo "<th>C1</th>";
  echo "<th>C2</th>";
  echo "<th>C3</th>";
  echo "<th>Nilai</th>";
  echo "<th>Rank</th>";
  echo "<tr>";
  echo "<th>Vektor Eigen</th>";
  for($tmbbb=0; $tmbbb<=2; $tmbbb+=1) {
    echo "<td>$BPK2[$tmbbb]</td>";
  }
  echo "</tr>";

  for($tmb=0; $tmb<=1; $tmb+=1) {
    if( $tmb==0 ) {
       echo "<tr><th>A1</th><th>$TAAAC1[$tmb]</th></tr>";
    }
    if( $tmb==1 ) {
      echo "<tr><th>A2</th><th>$TAAAC1[$tmb]</th></tr>";
    }
  }

?>