Gelen <h1> lerin yerine <h3> koy diyorum fakat $content'i yeniden yazdırdığımda değişmiş olmuyor.
Ek olarak $content'e replacelediğim değeri itmem mi gerek?
str_replace('<h1>','<h3>',$content);
echo $content; 4
●142
str_replace('<h1>','<h3>',$content);
echo $content; $content = str_replace('<h1>','<h3>',$content);
echo $content; <?php
foreach($cikti[1] as $title) {
$mycontent = str_replace('<h1>', '<h1 id="' . seo($title) . '">' . $title . '</h1>', $mycontent);
$mycontent = str_replace('<h2>', '<h2 id="' . seo($title) . '">' . $title . '</h2>', $mycontent);
$mycontent = str_replace('<h3>', '<h3 id="' . seo($title) . '">' . $title . '</h3>', $mycontent);
$mycontent = str_replace('<h4>', '<h4 id="' . seo($title) . '">' . $title . '</h4>', $mycontent);
$mycontent = str_replace('<h5>', '<h5 id="' . seo($title) . '">' . $title . '</h5>', $mycontent);
$mycontent = str_replace('<h6>', '<h6 id="' . seo($title) . '">' . $title . '</h6>', $mycontent);
}
?>
<?php echo $mycontent; ?>Kaydettiğim:
