Welcome Guest, Not a member yet? Register   Sign In
how to find and count the words in a string?
#1

[eluser]basty_dread[/eluser]
Hello, I need your help guys.


this is my code:

Code:
$words = "this is my page and the page is the only page that is nice";

my problem is i want to search the word "page" in the $words and count it if how many "page" word is in $words.


Please help and thank you.

in the example,
i found 3 words that is equal to the word "page"


Messages In This Thread
how to find and count the words in a string? - by El Forum - 11-16-2009, 02:46 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 02:59 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 03:00 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 03:07 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 03:38 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 03:59 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 04:01 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 05:25 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 05:41 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 05:44 AM
how to find and count the words in a string? - by El Forum - 11-16-2009, 07:39 PM
how to find and count the words in a string? - by El Forum - 11-17-2009, 03:18 AM
how to find and count the words in a string? - by El Forum - 11-17-2009, 04:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB