批改状态:合格
老师批语:
<?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>';点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号