I want get first 50 characters and want end this with a word.
So I get first 50 characters with $dis=substr($dis, 0, 50);
And I don't know how can delete latest word.
My Text:
You will find that the truth is often unpopular and the contest between agreeable fancy and disagreeable fact is unequal.
First 50 characters:
"You will find that the truth is often unpopular an"
While First 51 characters:
"You will find that the truth is often unpopular and"
(First 50 characters) - (Latest word):
"You will find that the truth is often unpopular"