php-general | 2005051
Date: 05/14/05
- Next message: Bart Seresia: "[PHP] Re: Repost: mod_rewirte loses POST data"
- Previous message: Jared Williams: "RE: [PHP] DOMDocument and html doctype"
- In reply to: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Next in thread: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Reply: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Saturday 14 May 2005 16:25, Brian V Bonini wrote:
> <?php
>
> $html = <<<EOS
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html><body>Test<br></body></html>
> EOS; Â
>
> $pattern = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN">';
>
> $doc = new DOMDocument();
> $doc->loadHTML($html);
> preg_match($pattern, $doc->saveHTML(), $matches);
> echo '<' . $matches[0] . '>';
>
> ?>
Well, that ist a very crazy idea...
If Claudio knows the doctype allready, he not needs to access this doc type
string. A preg_match is the wrong function at this place or will you write a
switch/case block that knows every doctype definition?
This only is usefull to see if the string exists or not.
Regards
-- Johannes Findeisen-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Bart Seresia: "[PHP] Re: Repost: mod_rewirte loses POST data"
- Previous message: Jared Williams: "RE: [PHP] DOMDocument and html doctype"
- In reply to: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Next in thread: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Reply: Brian V Bonini: "Re: [PHP] DOMDocument and html doctype"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

