I have been playing tonight for a few minutes.

The following code:


$lineArray = file("/home/actsmin/www/home_page.html");

// make an empty variable first
$content =  "";

// concat all array element
foreach($lineArray as $eachLine) {

if ( eregi("<a href=" , $eachLine) == "1" ) {

#line contains a link

echo strlen(stristr($eachLine, "<a href=")) . "\r\n";
echo trim(stristr($eachLine, "<a href=")) . "\r\n";


$content .= $eachLine;


Produces me output like:



What I want to do now is to remove the 

<a href=" 

and just be left with 


and remove all the text which follows this --- On this line it is


Would someone help me do this?


Reply via email to