Re: Translation of html?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gustav Wiberg wrote:
> Hi there!
> Is this possible? I can't find any functions for this (I don't exactly what to search for)
> 
> Translation of Html-string from 
> $str = "<h1>This is a title></h1><table><tr><td>test</td></tr></table>";
> 
> To a string that is like:
> This is a title
> Test


This class converts HTML to plain, formatted ASCII text. By default, the
text is wrapped to 70 characters, and some basic formatting is applied
to preserve some of the HTML formatting. Some examples:

    * Paragraphs are indented
    * Heading tags <h1> - <h3> are all caps
    * Horizontal lines, <hr>, are converted to hyphens
    * Links are preserved as a footnoted list at the end
 http://chuggnutt.com/html2text.php

Regards,
=dn

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux