Sheesh! No one should let me reply to email without sufficient
caffiene! Now, I actually just read and grokked your question...
I haven't tested this. And, I included a line that removes
apostrophes (eg; "steve's" becomes "steve"). You can comment that
line out if this doesn't suit your needs.
OK, this is less elegant (to me, anyway), and probably a bit slower, but:
function word_occurrence($word,$phrase) {
$word = strtolower($word); # this way,
$phrase = strtolower($phrase); # case is irrelevant
$Bits = split('[^[:alnum:]]+', $phrase);
$count = 0;
for ($i=0; $
At 11:07 PM +0200 4/14/01, n e t b r a i n wrote:
>Hi all,
>anyone have or know where I can find a small function in order to extract
>from a string the most relevant words in it?
>
>something like this:
>
>$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
>$occurence=2;
>//$occ
Hi all,
anyone have or know where I can find a small function in order to extract
from a string the most relevant words in it?
something like this:
$var="I love coffe ... Coffe is from Brazil and coffe with milk ..";
$occurence=2;
//$occurence means word that are repeat 2 or more times
my_dream_
4 matches
Mail list logo