<html>
<head>
<title>for循環示例</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<body>
<h2 align=center >客戶端的信息-FOR循環</h2>
<hr color=red>
<!--PHP程序的開始-->
<?
echo"<table border=1> ";//顯示表格的邊框
/******************************
用for循環來讀取$GLOBALS數組的值
在循環體中顯示出客戶端的信息
*******************************/
for ($key=reset($GLOBALS);$key=key($GLOBALS);$key=next($GLOBALS))
{
$value=pos($GLOBALS);
echo "<tr><td>$key</td><td>$value</td></tr>
";
}
echo "</table> ";
?>
<!--PHP程序的結束-->
</body>
</html>
Trackback: aspx?PostId=1423202">http://tb.blog.csdn.net/TrackBack.aspx?PostId=1423202