Re: HTML formatting
| From: | BB | Date: | Fri, 28 Jun 2002 13:56:13 +0000 |
| Subject: | Re: HTML formatting | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104323@lists.php.net to get a copy of this message | ||
THANKS!!!
great help! :oP
"Liljim" <liljim@liljim.co.uk> wrote in message
news:20020628124708.52008.qmail@pb1.pair.com...
> Actually, I just threw in this amendment:
>
> function CleanUpHtml($var)
> {
>
> $var = preg_replace("!<t(a|r|d)(.*?)style=\".*?\"(.*?)>!is",
> "<t$1$2$3>",
> $var);
> $var = preg_replace("!<table.*?>!is", "<TABLE border=1
> bordercolor='#666666' cellpadding=3 cellspacing=0>", $var);
> $var = str_replace("<p>", "", $var);
> $var = str_replace("<P>", "", $var);
> $var = str_replace("</p>", "", $var);
> $var = str_replace("</P>", "", $var);
>
> preg_match_all("!<(/?t.*?)>!is", $var, $output);
>
> if (count($output[0]) > 0)
> {
> for($i=0; $i<count($output[0]); $i++)
> {
> $var = str_replace($output[0][$i], strtolower($output[0][$i]), $var);
> }
> }
>
> return $var;
> }
>
> and now all of the table tags are lowercase. Much nicer.
>
> -J
>
>