Specifications
if (!($num_urls=mysql_num_rows($result)))
return false;
$urls = array();
// build an array of the relevant urls
for ($count=0; $row = mysql_fetch_object($result); $count++)
{
$urls[$count] = $row->bm_URL;
}
return $urls;
}
Some sample output from recommend.php is shown in Figure 24.11.
Building Practical PHP and MySQL Projects
P
ART V
536
LISTING 24.27 Continued
FIGURE 24.11
The script has recommended that this user might like pets.com. Two other users in the database who both
like slashdot.org have this bookmarked.
30 7842 ch24 3/6/01 3:34 PM Page 536










