Actions
Evolution #403
closedexport : convert html to plain text to enhanced lisibility
Start date:
07/29/2014
Due date:
% Done:
100%
Estimated time:
2.00 h
Resolution:
Description
export : convert html to plain text to enhanced lisibility
See class : http://www.chuggnutt.com/html2text (also in attached file)
http://www.chuggnutt.com/html2text-source
<?php // Include the class definition file. require_once(‘class.html2text.inc’); // The “source” HTML you want to convert. $html = ‘Sample string with HTML code in it’; // Instantiate a new instance of the class. Passing the string // variable automatically loads the HTML for you. $h2t =& new html2text($html); // Simply call the get_text() method for the class to convert // the HTML to the plain text. Store it into the variable. $text = $h2t->get_text(); // Or, alternatively, you can print it out directly: $h2t->print_text(); ?>
Files
Updated by Simon about 10 years ago
- Status changed from Nouveau to Fermé
- % Done changed from 0 to 100
Applied in changeset linea21|r2533.
Updated by Simon about 10 years ago
Replaced by https://github.com/PHPMailer/PHPMailer/blob/master/extras/class.html2text.php
because the other one used deprecated PHP function, see r2552
Actions