Leider nein alles beim alten

Und zum Filtern des Artikeltextes:$headline = urldecode($db->f("value"));
for ($j="CMS_VALUE[3]"; $j < "CMS_VALUE[3]"+20; $j++)
{
$headline1 = substr($headline , 0, $j);
$headline = str_replace ('<H4>' , '', $headline );
$headline = str_replace ('</H4>' , '', $headline );
$cut = substr($headline, $j);
if ((ord ($cut) == 32)||(ord ($cut) == 44)||(ord ($cut) == 45)) {
$headline= substr($headline , 0, $j);
$headline .= ' ...';
}
}
Wie man sieht werden die <h4> tags komplett ausgefiltert, die <p> tags des Textes werden ebenfalls gefiltert allerdings wird das öffnende <p> mit einem <br> ersetzt. So steht der Text nicht gar so weit von der Überschrift ab. Der Zeilenumbruch wird dann per <br> gewährlestet.$text = urldecode($db->f("value"));
for ($i="CMS_VALUE[13]"; $i < "CMS_VALUE[13]"+20; $i++)
{
$text1 = substr($text , 0, $i);
$text = str_replace ('<P>' , '<br>', $text);
$text = str_replace ('</P>' , '', $text);
$cut = substr($text, $i);
if ((ord ($cut) == 32)||(ord ($cut) == 44)||(ord ($cut) == 45)) {
$text= substr($text , 0, $i);
$text .= ' ...';
}
}