如何在php中更改表行和列

时间:2017-01-26 23:50:30

标签: php mysql

我有一张桌子:

<table>

    <tr>
      <td>date</td>
      <td>time1</td>      <td>time2</td>      <td>time3</td>
    </tr>
    <tr>
      <td>2017-01-14</td>
      <td>yes</td>    <td>--</td>     <td>yes</td>
    </tr>
    <tr>
      <td>2017-01-17</td>
      <td>--</td>     <td>--</td>     <td>yes</td>
    </tr>   <tr>
      <td>2017-01-23</td>
      <td>--</td>     <td>yes</td>    <td>yes</td>
    </tr>   </table>

enter image description here

我想将table,Rows和Column更改为:

<table>
    <tr>
      <td>date</td>
      <td>2017-01-14</td>
      <td>2017-01-17</td>
      <td>2017-01-23</td>
    </tr>

    <tr>
      <td>time1</td>
      <td>yes</td>
      <td>--</td>
      <td>--</td>
    </tr>
    <tr>
      <td>time2</td>
      <td>--</td>
      <td>--</td>
      <td>yes</td>
    </tr>
    <tr>
      <td>time3</td>
      <td>yes</td>
      <td>yes</td>
      <td>yes</td>
    </tr>
</table>

enter image description here

我该怎么做?

0 个答案:

没有答案