Correction status:qualified
Teacher's comments:
<?php $a = [1,2,3,4,5,6,7,8,9,10]; $b = ['name'=>'xuangGG','age'=>'19','xex'=>'男']; for($i=0;$i<count($a);$i++){ echo key($a).'=>'.current($a).'<br>'; next($a); } $i=0; while ($i<count($b)){ echo key($b).'=>'.current($b).'<br>'; next($b); $i++; } echo '<hr style="color: aquamarine">'; echo '<table border="1" cellpadding="4" cellspacing="0" width="60" align="center">'; echo '<caption>'.'信息表'.' </caption>'; echo '<tr>'; echo '<th>name</th><th>age</th><th>xex</th>'; echo '</tr>'; echo '<tr>'; foreach ($b as $value){ echo "<td>$value</td>"; } echo '</table>';
点击 "运行实例" 按钮查看在线实例