msql_fetch_array
传回阵列资料。
语法: array msql_fetch_array(int query_identifier);
传回值: 阵列
函式种类: 资料库功能
本函式用来将查询结果分割到阵列变数中。可以将本函式当作是 msql_fetch_row() 的加强版。
<?php echo "<ol type=A>\n"; $handle = msql_connect("localhost"); msql_selectdb("userinfo", $handle); $dbresult=msql_query("select * from info", $handle); while($dbarray=msql_fetch_array($dbresult)) { echo "<li>".$dbarray["IDNumber"]."\n"; } msql_close($handle); echo "</ol>\n"; ?>
|