I want to bring an excerpt from the beginning of a text file onto the webpage as a blurb. I want to remove the html coding from it.
I'm using eregi_replace, but it isn't removing the code.
Be grateful if an expert could say what I am doing wrong, please.
I'm using eregi_replace, but it isn't removing the code.
Be grateful if an expert could say what I am doing wrong, please.
Code:
$result = @mysql_query("SELECT id, head,LEFT(story, 220) as story, DATE_FORMAT(updated, '%d/%m/%y %H%i') as ud, nombre FROM inside ORDER BY id DESC LIMIT 3 ");
$story = $result['story'];
$story = eregi_replace('<div class=\"dropcaps\">', '',
$story );
$story = eregi_replace('</div>', '', $story );
$story = eregi_replace('<div class=\"boxed\">', '',
$story ); while( $row = mysql_fetch_array($result))
{
echo
'<h1 class="home">'
. $row["head"]
. ' </h1>'
. $row["story"]
. ' ... '
. ' <a href="inside/inside.php?id='
. $row["nombre"]
. '" title="Read more here.">More »</a></p>';
}