RE: [PHP] selecting words
| From: | Alfredeen, Johan | Date: | Tue, 07 Aug 2001 22:02:14 +0000 |
| Subject: | RE: [PHP] selecting words | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-61710@lists.php.net to get a copy of this message | ||
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:othermail@jamie-s.co.ukREMOVETOEMAIL]
Sent: Tuesday, August 07, 2001 3:53 PM
To: php-general@lists.php.net
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: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net