Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread olinux
wouldn't it be easier and more efficient to simply count the number of spaces in the string (and add 1)? using substr_count or something similar olinux --- Justin French <[EMAIL PROTECTED]> wrote: > You need to look at a few options... one is regular > expression (not my > forte), or perhaps w

Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread debbie_dyer
rray functions to do whatever else you need to do - counting, positions, etc Debbie - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: "Richard Kurth" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: Saturday, Sept

Re: Re[2]: [PHP] counting words in a string

2002-09-28 Thread Justin French
You need to look at a few options... one is regular expression (not my forte), or perhaps winding through the string one character at a time, writing a very simple state engine. Justin French on 28/09/02 4:47 PM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > Hello Justin, > > That worked per