Re: newbie q: how to count words in a file
| From: | Khalid El-Kary | Date: | Fri, 03 Jan 2003 13:59:47 +0000 |
| Subject: | Re: newbie q: how to count words in a file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-130098@lists.php.net to get a copy of this message | ||
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