View Single Post
Old 06-09-2002, 09:51 PM   #1 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
Just Signed Up. Eregi Question...

I have an HTML page with blocks of text seperated by two "<hr><hr>" tags.

I am trying to display each "match" as a seperate array item like this:

$matches[6]
$matches[7]
$matches[8]

As of now, only [0] works, and it shows up as one huge block with all the matches! any ideas? preg_match perhaps???

--------------------------------------------
$html = file("test.html");
$string = implode("", $html);

eregi ("<HR><HR>.*<HR><HR>", $string, $matches);

echo "$matches[0]";
---------------------------------------------------
rockyracoon is offline   Reply With Quote