Substring a text since the target founded
- by user580463
I have a search on my php page and it is ok.
With my search result, I highlighted the string target on my content.
$search_tag_text = @preg_replace("/($mysearch)/i", "<u style=\"color:red\">$1</u>", $row->txtContent);
Ok, but is it possible, after having found a string target on my content, to show 20 words before and 20 words after, instead listing all my content?
Any help will be appreciated.