-1
我有陣列這樣錶行計數混亂PHP FOREACH陣列
Array ([0] => 8 [1] => 8 [2] => 1 [3]=> 7 [4] => 8)
和我形成錶行與PHP使用的ForEach上述陣列。但是當你看上面的陣列時,會在第3行創建7個TD,在第4個行創建8個TD。我需要在行的開始處的第三行移動空白的TD,而不是在行的末尾顯示它。是否有可能?
<table border="1"><tbody>
<tr align="right">
<td align="right" colspan="0" rowspan="0" id="td_02">02</td>
<td align="right" colspan="0" rowspan="0" id="td_06">06</td>
<td align="right" colspan="0" rowspan="0" id="td_10">10</td>
<td align="right" colspan="0" rowspan="0" id="td_14">14</td>
<td align="right" colspan="0" rowspan="0" id="td_18">18</td>
<td align="right" colspan="0" rowspan="0" id="td_22">22</td>
<td align="right" colspan="0" rowspan="0" id="td_26">26</td>
<td align="right" colspan="0" rowspan="0" id="td_30">30</td>
</tr>
<tr align="right">
<td align="right" colspan="0" rowspan="0" id="td_01">01</td>
<td align="right" colspan="0" rowspan="0" id="td_05">05</td>
<td align="right" colspan="0" rowspan="0" id="td_09">09</td>
<td align="right" colspan="0" rowspan="0" id="td_13">13</td>
<td align="right" colspan="0" rowspan="0" id="td_17">17</td>
<td align="right" colspan="0" rowspan="0" id="td_21">21</td>
<td align="right" colspan="0" rowspan="0" id="td_25">25</td>
<td align="right" colspan="0" rowspan="0" id="td_29">29</td>
</tr>
<tr align="right">
<td>XX</td>
<td>XX</td>
<td>XX</td>
<td>XX</td>
<td>XX</td>
<td>XX</td>
<td>XX</td>
<td>XX</td>
</tr>
<tr align="right">
<td align="right" colspan="0" rowspan="0" id="td_03">03</td>
<td align="right" colspan="0" rowspan="0" id="td_07">07</td>
<td align="right" colspan="0" rowspan="0" id="td_11">11</td>
<td align="right" colspan="0" rowspan="0" id="td_15">15</td>
<td align="right" colspan="0" rowspan="0" id="td_19">19</td>
<td align="right" colspan="0" rowspan="0" id="td_23">23</td>
<td align="right" colspan="0" rowspan="0" id="td_27">27</td>
</tr>
<tr align="right">
<td align="right" colspan="0" rowspan="0" id="td_31">31</td>
<td align="right" colspan="0" rowspan="0" id="td_04">04</td>
<td align="right" colspan="0" rowspan="0" id="td_08">08</td>
<td align="right" colspan="0" rowspan="0" id="td_12">12</td>
<td align="right" colspan="0" rowspan="0" id="td_16">16</td>
<td align="right" colspan="0" rowspan="0" id="td_20">20</td>
<td align="right" colspan="0" rowspan="0" id="td_24">24</td>
<td align="right" colspan="0" rowspan="0" id="td_28">28</td>
</tr>
</tbody></table>
顯示您的代碼。 –
還顯示您的PHP代碼與您創建的HTML部分。 而且最好也描述該表應該如何,因爲這不是從您的初始職位100%決定性的。 – Thomas
我不在第三行看到'空白TD'... – arkascha