Jamie,
  There was a post earlier very similar to this. If you have a database, you
could use SELECT LEFT(mycolumn, 100) FROM mytable WHERE ...

Without a db, you can use the PHP substring function:

substr()

Hope this helps,

Johan Alfredeen
www.pongworld.com


-----Original Message-----
From: Jamie Saunders [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 3:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] selecting words


Hi,

What I'd like to do is take a string (paragraph) of text consisting of say
500 words and display only the first 100 words.  Is there a function able to
do this?

Thanks.

Jamie



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to