Home >Backend Development >PHP Tutorial >Android programmers learn PHP development (14)-whlie exercises-PhpStorm
Please indicate the source for reprinting: http://www.php.cn/
If you find the blog post useful, please like it, comment it, and follow it, thank you! ~
In fact, compared to whlie, I prefer to use for. Here we practice the table form together. Take a look at the GIF dynamic rendering, and take a look at the code:
There is no new knowledge point, so there are no comments in the code. For novice friends who don’t know what to ask, let’s learn php~~
<?php $i = 0; while (true){ echo "{$i}<br>"; $i++; if ($i > 10){ break; } } /** ***********************分割线************************* */ echo "<table border='1' align='center' width='100'>"; echo "<caption><h3>iwanghang</h3></caption>"; $i = 0; while ($i < 10){ echo "<tr><td>{$i}</td></tr>"; $i++; } echo "</table>"; /** ***********************分割线************************* */ echo "<table border='1' align='center' width='100'>"; echo "<caption><h3>iwanghang</h3></caption>"; $i = 0; while ($i < 100){ if ($i % 10 == 0){ echo "<tr>"; } echo "<td>{$i}</td>"; $i++; if ($i % 10 == 0){ echo "</tr>"; } } echo "</table>"; /** ***********************分割线************************* */ $i = 0; while ($i < 10){ echo "#"; $i++; } echo "<br>"; /** ***********************分割线************************* */ echo "<table border='1' align='center' width='100'>"; echo "<caption><h3>whlie练习</h3></caption>"; $i = 0; while ($i <10){ $j = 0; if ($i%2==0){ echo '<tr bgcolor="#999999">'; }else{ echo '<tr>'; } while ($j < 10){ echo "<td>$j</td>"; $j++; } $i++; } echo "</table>";
The above is for Android programmers to learn PHP development (14)-whlie exercises-PhpStorm Content, please pay attention to the PHP Chinese website (www.php.cn) for more related content!