RE: [PHP] Extract of a Paragraph
| From: | Brian Paulson | Date: | Wed, 04 Feb 2004 15:35:41 +0000 |
| Subject: | RE: [PHP] Extract of a Paragraph | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176804@lists.php.net to get a copy of this message | ||
$string = substr($stringname,0,50);
echo $string;
http://www.php.net/substr
Thank You
Brian Paulson
Sr. Web Developer
bpaulson@chieftain.com
www.chieftain.com
1-800-279-6397 x 207
-----Original Message-----
From: Daniel Perez Clavero [mailto:daniel.perez@atosorigin.com]
Sent: Wednesday, February 04, 2004 7:01 AM
To: php-general@lists.php.net
Subject: [PHP] Extract of a Paragraph
Hi list,
I would like to show a extract (first 50 words of a text), in order to
construct something similar to articles view with read more link.
To Extract the first 50 words, should I use str_word_count, and
explode/implode or there´s another way, much simple.
Any sample would be apreciated.
Regards
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php