Re: tags to lowercase
| From: | Curt Zirzow | Date: | Thu, 31 Jul 2003 02:41:47 +0000 |
| Subject: | Re: tags to lowercase | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157641@lists.php.net to get a copy of this message | ||
* Thus wrote Justin French (justin@indent.com.au):
> Sounds great, although I doubt my host will install... has anyone
> considered such a beast running as a PHP function/class?
Hey justin,
well, i just got done toying around with a little function that can
do almost all of what you want.
With a little regex magic and the nice little function
preg_replace_callback() I made it almost 100% combatible to html.
It will choke on some badly formated attributes though, thats the
only thing to get fixed.
Here is the code and test:
http://zirzow.dyndns.org/html/php/tests/tags_tolower/preg_replace.php
Curt
--
"I used to think I was indecisive, but now I'm not so sure."