Displaying first 100 characters of an article
| From: | Ben Weinberger | Date: | Tue, 03 Oct 2000 07:26:37 +0000 |
| Subject: | Displaying first 100 characters of an article | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18376@lists.php.net to get a copy of this message | ||
Hi~
I'm pulling data out of a MySQL db and displaying it on a web page... the data is like a news article with a title and a body. Currently, I can display the title and I have it linked to a javascript pop-up window that displays the full article. I would like to add the first 100 characters of the article under the title as well... something like follows:
Version 6.0 just Released
We've worked hard to bring you a new and improved version 6.0 software package so that you....
Is there a way to make those words under the title appear and only display the first 100 characters followed by a "..."?
Thanks,
-Ben