这个函数不大明白,谁能解释一下呢?
function get_user_urls($username)
{
//extract from the database all the URLs this user has stored
$conn = db_connect();
$result = $conn->query( "select bm_URL
from bookmark
where username = '$username'");
if (!$result)
return false;
//create an array of the URLs
$url_array = array();
for ($count = 1; $row = $result->fetch_row(); ++$count)
{
$url_array[$count] = $row[0];
}
return $url_array;
}
主要是:
for ($count = 1; $row = $result->fetch_row(); ++$count)
{
$url_array[$count] = $row[0];
}
这一段落不明白,大哥们帮帮我,谢谢!