使对语用句循环遍历数组

& lt; ?php

//使用数组()语句将联系人列表中第一条记录声明成一维数组联系

美元联系=数组(1,“高某人”,“一个公司”、“北京市”,“(010)98765432”、“gao@brophp.com”);


//以表格的形式输出一维数组中的每个元素

回声”& lt;表边界=' 1 '宽度=?00”=爸行摹痹诙云搿?

回声”& lt; caption> & lt; h2>联系人列表& lt;/h2> & lt;/caption>”;

回声”& lt; tr背景=# ff0000的祝辞”;


//以html的th标记输出表格的字段名称

回声”& lt; th>编号& lt;/th> & lt; th>姓名& lt;/th> & lt; th>公司& lt;/th> & lt; th>地址& lt;/th> & lt; th>电话& lt;/th> & lt; th>邮箱& lt;/th>”;

回声”& lt;/tr> & lt; tr>“;


//使用的循环输出一维数组中的元素

(i=0; i<美元;count($);美元我+ +){

回声”& lt; td>接触[$ i] & lt;美元/td>”;,,//循环一次输出数组中的一个元素

}

回声”& lt;/tr> & lt;/table>”;

?在

使为语用句循环遍历数组


使对语用句循环遍历数组