Thanks Dan, Does the job neatly!
Regards, Andre On Monday 24 June 2002 06:01 pm, you wrote: > Andre: > > On Mon, Jun 24, 2002 at 05:29:16PM -0400, Andre Dubuc wrote: > > Is there a function that counts the number of words in a string? > > I don't recall there being one. But, you could do this: > > $array = preg_split('/\s+/', $string); > echo count($array); > > Enjoy, > > --Dan -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the Holy Souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php