I know that PHP has not function to set a string to proper case, look at the example below.

Original string - "an article from a book"
PHP ucwords() - "An Article From A Book"
Expected Result -"An Article from a Book"

Now, the following words that are not at the start of a string should not be capatilised...

Code:
if, as, and, then, the, than etc
So... is their a function that will properly capatilise a string, if not, where can I get a list of words, such as those in the example above.

Thanks!