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
Actions