【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“create_table.php”一文,供大家参考学习
<?php
function create_table($data)
{
echo '<table border = 1>';
reset($data); // Remember this is used to point to the beginning
$value = current($data);
while ($value)
{
echo "<tr><td>$value</td></tr>\n";
$value = next($data);
}
echo '</table>';
}
$my_array = array('Line one.','Line two.','Line three.');
create_table($my_array);
?>