$desc = mysql_result($result, $i, 4);
             if (array_key_exists($name, $results)) {
                 list($r, $t, $m, $d, $w, $u) = $results[$name];
                 $results[$name] = array(($r + $relevance) * 2, $t, $m, $d, $w, $u);
             } else {
                 $id = strtoupper($name);
                 $m = strtolower($module);
                 $url = "html/libxml-{$module}.html#{$id}";
                 $results[$name] = array($relevance, $type, $module, $desc, $name, $url);
             }
         }
         mysql_free_result($result);
     }
 }
 if ($scope == 'any' || $scope == 'XSLT' || $scope == 'API' || $scope == 'XSLTAPI') {
     list($result, $j) = XSLTqueryWord($word);
     if ($j > 0) {
         for ($i = 0; $i < $j; $i++) {
             $relevance = mysql_result($result, $i, 0);
             $name = mysql_result($result, $i, 1);
             $type = mysql_result($result, $i, 2);
             $module = mysql_result($result, $i, 3);
             $desc = mysql_result($result, $i, 4);
             if (array_key_exists($name, $results)) {
                 list($r, $t, $m, $d, $w, $u) = $results[$name];
                 $results[$name] = array(($r + $relevance) * 2, $t, $m, $d, $w, $u);
             } else {
                 $id = strtoupper($name);
                 $m = strtolower($module);
                 $url = "XSLT/html/libxslt-{$module}.html#{$id}";
                 $results[$name] = array($relevance, $type, $module, $desc, $name, $url);
             $desc = mysql_result($result, $i, 4);
             if (array_key_exists($name, $results)) {
                 list($r, $t, $m, $d, $w, $u) = $results[$name];
                 $results[$name] = array(($r + $relevance) * 2, $t, $m, $d, $w, $u);
             } else {
                 $id = $name;
                 $m = strtolower($module);
                 $url = "html/libxml-{$module}.html#{$id}";
                 $results[$name] = array($relevance, $type, $module, $desc, $name, $url);
             }
         }
         mysql_free_result($result);
     }
 }
 if ($scope == 'any' || $scope == 'XSLT' || $scope == 'API' || $scope == 'XSLTAPI') {
     list($result, $j) = XSLTqueryWord("xslt{$word}");
     if ($j > 0) {
         for ($i = 0; $i < $j; $i++) {
             $relevance = mysql_result($result, $i, 0);
             $name = mysql_result($result, $i, 1);
             $type = mysql_result($result, $i, 2);
             $module = mysql_result($result, $i, 3);
             $desc = mysql_result($result, $i, 4);
             if (array_key_exists($name, $results)) {
                 list($r, $t, $m, $d, $w, $u) = $results[$name];
                 $results[$name] = array(($r + $relevance) * 2, $t, $m, $d, $w, $u);
             } else {
                 $id = $name;
                 $m = strtolower($module);
                 $url = "XSLT/html/libxslt-{$module}.html#{$id}";
                 $results[$name] = array($relevance, $type, $module, $desc, $name, $url);