A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 3: Plug-in 3 - Friendly Text

Sometimes when you have text to post on a website it can be quite dry and unexciting. Although there's not much you can do about that (apart from completely rewriting it) at least you can make it read better by converting it into as friendly a form as possible by making it flow better by using contractions. For example, replacing you have with you've or it is with it's is easier to read and more like the way we speak in day to day life, and this code takes that concept to the extreme.

The Figure shows an excerpt from one of Winston Churchill's speeches which now flows a lot better, although I admit, the original has a certain punchiness and power that's lost in the conversion. Still, it shows that you can leave this plug-in running on your server and it will almost always produce proper, readable English.