";
$result = $db->query( $query )
or die ("Cannot execute query");
echo "
";
while ($row = $result->fetch_array()){
$notiz =str_replace ('"', '\"' , $row['notiz']);
$notiz = preg_replace("/\r*|\n*/s", "", $notiz);
$notiz = preg_replace("/(\r\n|\n|\r)/", "", $notiz);
$notiz = strip_tags($notiz, '');
$count = substr_count($notiz,"$wort");
echo "
$row[lid]
|
$row[datum1]
|
$row[ueberschrift]
|
$count
|
";
}
echo "
";
/*
$text = 'Dies ist ein Test';
echo strlen($text)."
"; // 17
echo substr_count($text, 'es')."
"; // 2
// wird der String auf 's ist ein Test' reduziert,
// lautet das ausgegebene Ergebnis 1
echo substr_count($text, 'es', 3)."
";
// wird der String auf 's i' reduziert,
// lautet das Ergebnis 0
echo substr_count($text, 'es', 3, 3)."
";
// generiert eine Warnung, da 5+13 > 17
echo substr_count($text, 'es', 5, 13)."
";
*/
?>