PHP library to convert HTML to formatted plain text
Latest commit cd71f2e Jul 15, 2016 @mtibben committed on GitHub Merge pull request #70 from ajouve/getHtml


A PHP library for converting HTML to formatted plain text.

Build Status

Basic Usage

$html = new \Html2Text\Html2Text('Hello, &quot;<b>world</b>&quot;');

echo $html->getText();  // Hello, "WORLD"


This library started life on the blog of Jon Abernathy

A number of projects picked up the library and started using it - among those was RoundCube mail. They made a number of updates to it over time to suit their webmail client.

Now it has been extracted as a standalone library. Hopefully it can be of use to others.