PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 42%Total: 1,297 All time: 2,977 This week: 455Up
Version License PHP version Categories
cut-html-string 1.1GNU General Publi...5.0HTML, PHP 5, Text processing
Description 

Author

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.

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
Picture of prajwala
Name: prajwala <contact>
Classes: 1 package by
Country: India India
Age: ???
All time rank: 2021125 in India India
Week rank: 163 Up17 in India India Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,297
This week:0
All time:2,977
This week:455Up
 User Ratings  
 
 All time
Utility:70%StarStarStarStar
Consistency:70%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:42%StarStarStar
Rank:3670