Re: [PHP] counting words in a string

2002-09-27 Thread Justin French
if this is your SPECIFIC problem, putting a space at the beginning of $srch will help, eliminating XAVAILABLE... but this will cause a problem with the word AVAILABLE appearing at the start of the string, so temporarily put a space at the start of the string: this won't help if there are newlin

Re: [PHP] Counting Words In a String

2001-04-23 Thread Robert Vetter
Greg Donald wrote: > > > I want to check a string and return the amount of words present > > in it. These > > strings could be quite large, some higher than 100,000 > > characters. I realize > > I could explode the string on the whitespace and count the number > > of values. > > However, I'm no

RE: [PHP] Counting Words In a String

2001-04-22 Thread Greg Donald
> I want to check a string and return the amount of words present > in it. These > strings could be quite large, some higher than 100,000 > characters. I realize > I could explode the string on the whitespace and count the number > of values. > However, I'm not sure this would be the most opti