Generate search excerpts from text given search terms in PHP.