表中的Html表

时间:2016-10-12 15:37:20

标签: html

我正在尝试复制此enter image description here这是一个包含3列的表,另一个表在每晚平均价格列中,但是我无法将其与我的表格匹配。这就是我的表格Table2

这是我的代码。我只是想知道为什么我的专栏看起来不像那样,

    <xsl:template match="/">
    <html>
    <head>        
    <title></title>
    </head>

    <body>
      <h1>Hotels in the Key West Area</h1>
      <table  class="first">
        <tr>
         <p><th><h2>Name</h2></th>
          <th><h2>Rating</h2></th>
          <th><h2>Average Price Per Night</h2></th></p>
        </tr>
        <xsl:for-each select ="ArrayOfHotelListItems/HotelListItems">
         <xsl:sort select="Rating" order="descending" data-type="number" />
          <tr>
            <td><p><xsl:apply-templates select="Name"/></p></td>
            <td><p><xsl:apply-templates select="Rating" /></p></td>

            <td>
              <table class="second">

                <xsl:for-each select="./Rooms/Room">


                    <td>
                     <xsl:value-of select="RoomType"/> = $<xsl:value-of select="Rate"/>
                    </td>

                </xsl:for-each> 

              </table>
            </td>               
          </tr>
        </xsl:for-each>
      </table>

    </body>
  </html>
</xsl:template>

1 个答案:

答案 0 :(得分:0)

不确定您的问题是什么,因为您似乎正在正确地复制嵌套表...除了一些样式的东西。但是,看看你的HTML我会添加它以使它更“合适”:

$bdd->query("SELECT * FROM coordonnees WHERE id=9);
$data=$reponse->fetch(PDO::FETCH_ASSOC) 

*注意表格行标签已添加....