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 http://www.php.net/manual/en/ref.strings.php.
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 1997_White_Chevy_S10_Loaded_Power_Everything_$2000_Call_555-1212_for_inf 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, but > 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 calculate > the total number of lines > based on character total. > > Anyone know of way to accomplish this, I know that it will have to be done > 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 > http://sbc.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php