Search code examples
phpstringdictionarywords

Use PHP to Find Words in a String Without Spaces


I am looking for a php library that can be used to take a string like "happyeaster" or "buyaboat" and return the individual words - "happy" and "easter" or "buy" "a" "boat". Does anyone know of an existing library or something already built that can be downloaded or purchased to do this?


Solution

  • I ended up taking this scrip http://squarecog.wordpress.com/2008/10/19/splitting-words-joined-into-a-single-string/ and redoing it in PHP. I also accept the first solution with the least amount of words.