(.*)<\/h1>/im', $content, $matchs); $title = null; if (!empty($matchs)) { $title = $matchs[1]; } //The name is the equal to the file $content = strip_tags($content); $count = preg_match_all("/" . $keywords . "/im", $content, $m); if ($count != 0) { //Search in the file if (!empty($title)) { $helps[$title] = array( 'id' => $help_id, 'count' => $count); } else { $helps[] = array( 'id' => $help_id, 'count' => $count); } } } } if (empty($helps)) { $helps = false; $totalHelps = 0; } else { $totalHelps = count($helps); } } else { $totalHelps = 0; } } ?>