\n"; } rsort($res); reset($res); return($res); } function MostPopularNextMatch($dbi, $res) { return; // the return result is a two element array with 'hits' // and 'pagename' as the keys if (list($index1, $index2, $pagename, $hits) = each($res)) { echo "most popular next match called
\n"; echo "got $pagename, $hits back
\n"; $nextpage = array( "hits" => $hits, "pagename" => $pagename ); return $nextpage; } else { return 0; } } function GetAllWikiPagenames($dbi) { $namelist = array(); $d = opendir($dbi); $curr = 0; while($entry = readdir($d)) { $namelist[$curr++] = $entry; } return $namelist; } ?>