View Single Post
Old 06-09-2002, 10:21 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
http://www.milanointeractive.com/eregi.php

this is what the text.html looks like:
-----------------------------------------------------
<hr><hr>this is some text <hr><hr>
<hr><hr>aaaaaaaaaa <hr><hr>
<hr><hr>bbbbbbbb<hr><hr>
<hr><hr>ccccccc <hr><hr>
<hr><hr>dddddddd <hr><hr>
----------------------------------------------------

and this is what eregi.php looks like:
---------------------------------------------------

<?

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

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

foreach($matches as $a){
echo "$a<br>";
}

?>

---------------------------------------------------

not sure if that is what you were trying to do... now you can always strip away the <hr> tags if you would like to in the foreach statement: for example:


foreach($matches as $a){
str_replace("<hr>","",$a);
echo "$a<br>";
}

anyhow.. good luck
sde is offline   Reply With Quote