php自动补全 <tr>等标签的有关问题

WBOY
Release: 2016-06-13 12:51:01
Original
970 people have browsed it

php自动补全

等标签的问题
我有一段类似这样的代码
<br />
<?php <br />
  for($i = 0 ; $i < 10 ; $i++)<br />
  {<br />
      if($i % 2 == 0)<br />
      {<br />
        echo "<tr>";<br />
      }<br />
      echo "<td>@#$%^&*$%^&</td>";<br />
      if($i % 2 == 0)<br />
      {<br />
        echo "</tr>";<br />
      }<br />
  }<br />
?><br />
Copy after login

我希望创建共5行,每行两列的表格
,可是最终却建立了十行,每行一列

可是当我这样做:
<br />
<?php <br />
  for($i = 0 ; $i < 10 ; $i++)<br />
  {<br />
      if($i % 2 == 0)<br />
      {<br />
        echo "<tr>";<br />
      }<br />
      echo "<td>@#$%^&*$%^&</td>";<br />
  }<br />
?><br />
Copy after login


就正常了,脚本自动生成了tr结束标签

这十分讨厌,当我想创建更复杂的表格的时候,我都闹不清到底哪些标签它会自动生成,哪些不会,到最后生成出来的表格一团乱.

有什么办法让它不自动生成.

------解决方案--------------------
最好就是不要用表格控制这些数据,用li之类的多好,不然判断过去判断过来的...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!