PHP Classes
elePHPant
Icontem

Entitize Class: Convert text into HTML entities

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 (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-04-16 (8 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 490 All time: 5,459 This week: 1,546Up
Version License PHP version Categories  
entitize 1.0GNU Lesser Genera...4HTML, Text processing
Description Author  

This is a simple class that can be used to convert a text string into HTML entities.

It converts all characters in a text string into another string that represents the same characters in HTML using the decimal character representation &#ddd; .

Picture of Jonathan Discipulo
Name: Jonathan Discipulo is available for providing paid consulting. Contact Jonathan Discipulo .
Classes: 7 packages by
Country: Philippines Philippines
Age: 33
All time rank: 75612 in Philippines Philippines
Week rank: 891 Down10 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 2x

Details provided by the author  
To use the class, simply include it on your PHP file:

  include('class.entitize.php');

Then, instantiate the class:

  $entitize = new Entitize();

Now, you can convert any string into HTML entities by doing so:

  $email = $entitize->convert('jonathan@exploitedweb.com');

  $text = 'This text is not readable when viewed in source code';
  $text = $entitize->convert($text);

Have fun!
  Files folder image Files  
File Role Description
Plain text file class.entitize.php Class Class Entitize
Accessible without login Plain text file sample.php Example Sample file
Accessible without login Plain text file readme.txt Doc. Usage

 Version Control Unique User Downloads Download Rankings  
 0%Total:490All time:5,459
 This week:0This week:1,546Up