Location: PHPKode > scripts > mk_t2h > mk_t2h/sample.php
<?php

$input_text='
	<table width="200" bgcolor="#666000" onmouseover="javascript:window.open(\'http://www.phpclasses.org/\',\'phpclasses_win\',\'resizable=no\')"><TR>	<TD WIDTH="100">&nbsp;</TD><TD>sample text 1 - <B>URL to be converted into HTML &lt;A&gt; link:</B> <I>http://www.phpclasses.org/</I></TD></TR></table>
	<LINK REL="STYLESHEET" TYPE="text/css" HREF="http://files.phpclasses.org/styles.css">
	<p><a href="http://www.phpclasses.org/" target="_top" THIS_TAG_WILL_BE_STRIPPED >http://www.phpclasses.org/</a></p>
';

require_once('class-mk_t2h.inc.php');

$ht1=new mk_t2h($input_text);

## comples function to just convert text with HTML tags to real HTML
$ht1->mk_text2html();

## this returns output of last function modifying class output (refer to class manual for list), in thic case mk_text2html()
echo($ht1->output_text);
## will produce:
## <BR />  <TABLE BGCOLOR="#666000"><TR> <TD>ΓΏ</TD><TD>sample text 1 - <B>URL to be converted into HTML &lt;A&gt; link:</B> <I><A HREF="http://www.phpclasses.org/" TARGET="_blank">http://www.phpclasses.org/</A></I></TD></TR></TABLE><BR />  <BR />  <P><A HREF="http://www.phpclasses.org/" TARGET="_blank">http://www.phpclasses.org/</A></P><BR />

### this returns array with information about HTML tags found in input
var_dump($ht1->tags_info);

?>
Return current item: mk_t2h