You can use explode() to split the text up into words, and then count
them up. You can use strlen() or substr() or something to see how many
"lines" there are...whatever you define a line as. Look up other useful
functions at 

I really think you'd be best off with a human deciding these things,
though, maybe with a little PHP help. If you make it all automated,
what's stopping me from posting
o and only being charged 1 cent for it??

---John Holmes...

> -----Original Message-----
> From: Dan McCullough [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 9:08 PM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
> I have some clients who want to charge a flat rate for words entered,
> over a certain number of
> words there is an additional charge, to complicate matters there is an
> option/addon where you can
> bold the lines, and there is a charge per line, so you have to
> the total number of lines
> based on character total.
> Anyone know of way to accomplish this, I know that it will have to be
> in seperate ways.  but
> does anyone have an idea or two .. hlp
> thanks,
> dan
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to