A search interface for data from the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office API. https://patents.copim.ac.uk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
293B

  1. <?php
  2. function highlight_search_terms($result, $search_term){
  3. $search_array = explode(" ", $search_term);
  4. foreach ($search_array as $term) {
  5. $replacement = "<span class='search_term'>$term</span>";
  6. $result = str_ireplace($term, $replacement, $result);
  7. }
  8. return $result;
  9. }
  10. ?>