13.13.1. ProblemYou need to convert HTML to readable, formatted plain text. 13.13.2. SolutionUse the html2text class available from http://www.chuggnutt.com/html2text.php. Example 13-51 shows it in action. Converting HTML to plain text
13.13.3. DiscussionThe html2text class has a large number of formatting rules built in so your generated plain text has some visual layout for headings, paragraphs, and so on. It also includes a list of all the links in the HTML at the bottom of the text it generates. 13.13.4. See Alsohttp://www.chuggnutt.com/html2text.php for more information on html2text and links to download it. |