Re: newbie q: how to count words in a file

From: Date: Fri, 03 Jan 2003 14:15:50 +0000
Subject: Re: newbie q: how to count words in a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-130101@lists.php.net to get a copy of this message
Thank you.. figured it out now. Tauntz Khalid El-Kary wrote:
Use file system functions to get the contents of the file in a string, then us substr_count() on that string. Filesystem: http://www.php.net/manual/en/ref.filesystem.php substr_count: http://www.php.net/manual/en/function.substr-count.php Regrads Khalid Al-kary
Hi ! I'm new to php and I have not found a solution for my problem (dumb me) ok.. here we go... I have a file.. it's content is: hello, ello, llo and so on and so on.... ok.. and now I want to know how many "hello" words are in that file.. how can I arrange it ?:) Thanks Tauntz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


« previous php.general (#130101) next »