AndyCap adlı üyeden alıntı: mesajı görüntüle
<?php
preg_match_all('/<h[1-6]>(.*?)</h[1-6]>/', $content, $cikti);
foreach($cikti[1] as $title) {
    echo '<a href="#' . seo($title) . '" onclick="goAnchor(' . seo($title) . ')">' . $title . '</a>' . "<br>";
}
foreach ($cikti[0] as $key => $element) {
    $title = $cikti[1][$key];
    $eski_tag = $element; 
    $yeni_tag = "<h$key id='" . seo($title) . "'>"; 
 
    $content = str_replace($eski_tag, $yeni_tag . $title . "</h$key>", $content);
}
Warning: preg_match_all(): Unknown modifier 'h' in
Notice: Trying to access array offset on value of type null in
Warning: Invalid argument supplied for foreach() in
Notice: Trying to access array offset on value of type null in
Warning: Invalid argument supplied for foreach() in
Hatalarını almaktayım. Veriyi getiriyor h leri doğru sıralıyor fakat ilk forwach yanlış dönüyor
@adwerd0z1;