Login   Register  
PHP Classes
elePHPant
Icontem

Cut HTML string: Cut an HTML excerpt with a given text limit

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-06-02 (5 years ago) RSS 2.0 feedStarStarStar 45%Total: 1,268 All time: 2,774 This week: 1,774Up
Version License PHP version Categories  
cut-html-string 1.1GNU General Public Lice...5.0HTML, PHP 5, Text processing
Description Author  
PHP Programming Innovation award winner
May 2009
Winner


Prize: One downloadable e-book of choice by O'Reilly
This class can be used to cut an HTML excerpt with a given text limit.

It takes a string with an HTML excerpt and return the initial text and tags so the text does not exceed a given limit.
Picture of prajwala
Name: prajwala <contact>
Classes: 1 package by
Country: India India
Age: ???
All time rank: 1836111 in India India
Week rank: 1779 Up135 in India India Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file cut-html-string Class Cut html string without cutting html tags

Innovation Award  
PHP Programming Innovation award winner
May 2009
Winner


Prize: One downloadable e-book of choice by O'Reilly
In PHP, it is easy to extract an excerpt of a text string with a given length limit. But if you want to extract an excerpt from HTML, the tags that may exist in the text string make it more complicated.

This class provides a solution to extract excerpts from HTML documents with a given text length limit without counting the length of any HTML tags.

Manuel Lemos
 Version Control Unique User Downloads Download Rankings  
 0%Total:1,268All time:2,774
 This week:0This week:1,774Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:45%StarStarStar
Rank:1914