pH-7 / Html2Text

A very simple (but efficient) "HTML to plain text" converter ✍️

Home Page:https://packagist.org/packages/ph-7/html-to-text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML to Plain Text

A simple lightweight "HTML to Plain Text" converter 🪄

📄 Overview

Ko Fi - Offer Me A Coffee

Simple. Clean. Efficient. Just what you need to convert HTML code into plain text 🧹

🐘 PHP Requirement

🛠 Installation

composer require ph-7/html-to-text

If you don't already use composer in your project, include Composer's autoload as shown below in your main PHP index file of your project.

require __DIR__ . '/vendor/autoload.php';

🥳 Usage

use PH7\HtmlToText\Convert;

$htmlCode = '<div><p><em>Some random paragraphs...</em></p></div>';

$this->html2Text = new Convert($htmlCode);
$plainText = $this->html2Text->getText();

echo $plainText;

😋 Who cooked it?

Pierre-Henry Soria

@phenrysay pH-7

Pierre-Henry Soria. A super passionate, zen & pragmatic software engineer 😊 Cheese & dark chocolate lover! 🧀🍫😋

️☕️ Are you enjoying it...? You could offer me a coffee if you wish 😋

Projects using it 🚀

⚖️ License

HTML to Text is generously distributed under MIT 🎉 Enjoy!

About

A very simple (but efficient) "HTML to plain text" converter ✍️

https://packagist.org/packages/ph-7/html-to-text

License:MIT License


Languages

Language:PHP 100.0%