PHP search within a string
I have a chunk of text like this:
And I would like to use PHP to search through it based on a word and return a snippet of the sentence where it appears and show a result like this:
$text = "Internal tissue sealants and hemostasis are relatively underpenetrated, although their use has grown rapidly. In 2012
, internal tissue sealants were used in just over 3% of the procedures listed above. Healthy growth is expected throughout
the forecast period, driven by growing adoption in key procedures, such as neurological surgeries and thoracic operations;
increasing use as an adjunct to hemostasis; and broadening indications. The value of revenues per procedure is expected to
remain relatively flat, below $400. Sales are expected to reach $370 million in 2018. Exhibit 4-7 presents the market forecast for
external and internal tissue sealants.";
Search word: hemostasis
1) ...Internal tissue sealants and hemostasis are relatively underpenetrated...
2) ...use as an adjunct to hemostasis; and broadening indications...