dreamwest Posted June 17, 2009 Share Posted June 17, 2009 How can i split up a string into seperate words and use that to search a database $search = "im following you"; //here i need to split up $search into individual words so it outputs: im following you Quote Link to comment https://forums.phpfreaks.com/topic/162537-split-string-of-words/ Share on other sites More sharing options...
Yesideez Posted June 17, 2009 Share Posted June 17, 2009 explode() http://uk.php.net/explode Quote Link to comment https://forums.phpfreaks.com/topic/162537-split-string-of-words/#findComment-857837 Share on other sites More sharing options...
Mark Baker Posted June 17, 2009 Share Posted June 17, 2009 str_word_count($searchTerms,2) Quote Link to comment https://forums.phpfreaks.com/topic/162537-split-string-of-words/#findComment-857839 Share on other sites More sharing options...
dreamwest Posted June 17, 2009 Author Share Posted June 17, 2009 explode() http://uk.php.net/explode Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/162537-split-string-of-words/#findComment-857847 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.