This should do the trick.

<?
$file = fopen("filename.html", "r"); //it can also be a URL
$readfile = fread($file, 20000);
$read = eregi("<something>(.*)</something>", $readfile, $output);
fclose($file);
echo $output[1];
?>

cheers,

Thor.

-----Original Message-----
From: Mark Green [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 6:06 PM
To: PHP General Mailing List
Subject: [PHP] Parse HTML Block


Hi Guys,

Im looking for a way to parse a value from between two tags

<something>This is what i want to return</something>

Basically its simply a block of HTML from within a large HTML file.
Speed is definately a consideration in any solution.

Any ideas?

Cheers,

Mark
-- 
<< If I was a signature file, where would I be?? >>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to