Hi,
I want to search and highlight multiple strings in the same colour. In order to do this, I want to initialise an array with all the search terms in and then run this through the searchAndHighlight function:
So far i have tried the below foreach loop without success.
<?php
require_once 'Classes/CreateDocx.inc';
$docx = new DocxUtilities();
$terms = array(
'data',
'highlight'
);
$options = array(
'highlightColor' => 'red',
'document' => true,
'endnotes' => true,
'comments' => true,
'headersAndFooters' => true,
'footnotes' => true,
);
foreach ($terms as $term) {
$docx->searchAndHighlight('output.docx', 'output.docx', $term, $options);
}
?>
Perhaps I am missing something. Any help would be most appreciated.