我想在td HTML中使用一个表

时间:2016-11-24 11:39:27

标签: php html html-table

我有一个html表,我想在td中包含一个表。

我的表格如下:

 <table class="table table-bordered" id="my_table">
                <thead>

   <tr>
                        <td style="text-align: center;">
    <?php echo get_phrase('Teachers'); ?> <i class="entypo-down-thin"></i> | <?php echo get_phrase('date'); ?> <i class="entypo-right-thin"></i>
                        </td>

        <td style="text-align: center;"><?php echo $i; ?></td>

                    <?php } ?>
         <td style="text-align: center;">
    <?php echo get_phrase('Grand Total'); ?> <i class="entypo-down-thin"></i> 

                        </td>
                        </td>
                    </tr>

                </thead>

我想在此td中添加一个html表。 I have attached a pic

1 个答案:

答案 0 :(得分:1)

你是一个嵌套表的例子,你需要做这样的事情,可以在http://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_elements找到anser

<table>
     <tr>
         <td>
             <p>This is a paragraph</p>
             <p>This is another paragraph</p>
        </td>
        <td>
            This cell contains a table:
            <table>
                <tr>
                    <td>A</td>
                    <td>B</td>
                </tr>
            </table>
        </td>
    </tr>
</table>